FileEditor class

A file in the editor, used by EditorModel model.code.

  • name is the name of the file shown in the navbar.
  • language is the language used by the theme
  • code is the content of the file, the code
  • readonly is a boolean that says if the file shall be editable or not

Tip: to simplify writing code in a String, write line by line your code in a List<String> and give as the first parameter list.join("\n").

Constructors

FileEditor({String? name, String? language, String? code, bool? readonly})

Properties

code String
Its content. By default an empty string.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
language String
The name of the language. By default: "text".
getter/setter pair
name String
The name of the file. By default is will be called "file" and its extension will be the given language, or 'txt'.
getter/setter pair
readonly bool
If the file shall not be edited, then set this to true. By default it is false.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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