EditorModelStyleOptions class

Set the style of CodeEditor. You have to use it in EditorModel() just like this :

EditorModel model = new EditorModel(
  files, // My files...
  styleOptions: new EditorModelStyleOptions(
    fontSize: 13, // Example
  ),
);

An EditorModel instance has the default values of EditorModelStyleOptions.

Constructors

EditorModelStyleOptions({EdgeInsets padding = const EdgeInsets.all(15.0), double heightOfContainer = 300, Map<String, TextStyle> theme = myTheme, String fontFamily = "monospace", double? letterSpacing, double fontSize = 15, double lineHeight = 1.6, int tabSize = 2, Color editorColor = defaultColorEditor, Color editorBorderColor = defaultColorBorder, Color editorFilenameColor = defaultColorFileName, Color editorToolButtonColor = defaultToolButtonColor, Color editorToolButtonTextColor = Colors.white, Color editButtonBackgroundColor = defaultEditBackgroundColor, Color editButtonTextColor = Colors.black, String editButtonName = "Edit", double? fontSizeOfFilename, TextStyle textStyleOfTextField = const TextStyle(color: Colors.black87, fontSize: 16, letterSpacing: 1.25, fontWeight: FontWeight.w500), ToolbarOptions toolbarOptions = const ToolbarOptions(), bool placeCursorAtTheEndOnEdit = true})

Properties

editButtonBackgroundColor Color
The background color of the button "Edit". By default Color(0xFFEEEEEE).
final
editButtonName String
The name of the "Edit" button. By default Edit.
final
editButtonPosBottom double?
getter/setter pair
editButtonPosLeft double?
getter/setter pair
editButtonPosRight double?
getter/setter pair
editButtonPosTop double?
getter/setter pair
editButtonTextColor Color
The text color fo the button "Edit". By default Colors.black.
final
editorBorderColor Color
Set the color of the borders between the navigation bar and the content. By default Color(0xFF3E416E).
final
editorColor Color
Set the background color of the editor. By default Color(0xff2E3152).
final
editorFilenameColor Color
Set the color of the file name in the navigation bar. By default Color(0xFF6CD07A).
final
editorToolButtonColor Color
Set the color property of the edit button. By default Color(0xFF4650c7).
final
editorToolButtonTextColor Color
Set the color of the edit button's text. By default Color(0xFF4650c7).
final
fontFamily String
Set the font family of the entire editor. By default "monospace".
final
fontSize double
Set the fontSize of the file's content. By default 15.
final
fontSizeOfFilename double?
Set the font size of the file's name in the navigation bar.
final
hashCode int
The hash code for this object.
no setterinherited
heightOfContainer double
Set the height of the container. By default 300.
final
letterSpacing double?
Set the letter spacing property of the text. By default null.
final
lineHeight double
Set the height (line-height in CSS) property of the text. By default 1.6.
final
padding EdgeInsets
Set the padding of the file's content. By default 15.0.
final
placeCursorAtTheEndOnEdit bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tabSize int
Set the size of the tabulation. By default 2. Do not use a too big number.
final
textStyleOfTextField TextStyle
Set the textStyle of the text field. By default :
final
theme Map<String, TextStyle>
Set the theme of the syntax. code_editor has its own theme. You can create your own or use others themes by looking at : import 'package:flutter_highlight/themes/'.
final
toolbarOptions ToolbarOptions
final

Methods

defineEditButtonPosition({required dynamic top, dynamic left, dynamic bottom, dynamic right}) → void
You can change the position of the button "Edit" / "OK". By default, bottom: 10, right: 15.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited