code_editor
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
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
First Click on edit
Second Click it is working
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"], ),
same issue.