code_editor icon indicating copy to clipboard operation
code_editor copied to clipboard

When I click on edit the text is not displayed, I need to click ok and click again edit to visualize it

Open abmptit opened this issue 1 year ago • 1 comments

Hello, Thanks for this package ;)

I tried small game using flutter with code_editor and eval package. it will be available in few hours there: https://play.google.com/store/apps/details?id=com.kapalak.connect4

The game is the famous Connect Four, In this Connect4Dev version player can create their own bot.

Before the edit click image

First Click on edit image

Second Click it is working image

Here my code CodeEditor( model: EditorModel( files: [ FileEditor( name: "player.dart", language: "dart", code: player.code, ) ], styleOptions: EditorModelStyleOptions( showUndoRedoButtons: true, reverseEditAndUndoRedoButtons: true, fontSize: 13, ), ), disableNavigationbar: true, // textModifier: (language, content) { // content = player.code ?? ""; // return content; // }, onSubmit: (String language, String value) { if (value != player.code) { try { setState(() { errorCodeEditor = ""; }); var grid = List.generate(42, (index) => $int(0)); var clicks = []; eval(value, function: 'getColumnToPlay', args: [grid, clicks]); player.code = value; playerUpdated = true; } catch (ex) { setState(() { errorCodeEditor = ex.toString(); }); } } }, formatters: const ["dart"], ),

abmptit avatar Jan 18 '24 22:01 abmptit

same issue.

kofj avatar Jul 27 '24 17:07 kofj