TextEditorConfigs class

Configuration options for a text editor.

TextEditorConfigs allows you to define settings for a text editor, including whether the editor is enabled, which text formatting options are available, and the initial font size.

Example usage:

TextEditorConfigs(
  enabled: true,
  canToggleTextAlign: true,
  canToggleBackgroundMode: true,
  initFontSize: 24.0,
);

Constructors

TextEditorConfigs({bool enabled = true, bool canToggleTextAlign = true, bool canToggleBackgroundMode = true, bool canChangeFontScale = true, double initFontSize = 24.0, TextAlign initialTextAlign = TextAlign.center, double initFontScale = 1.0, double maxFontScale = 3.0, double minFontScale = 0.3, List<TextStyle>? customTextStyles, LayerBackgroundMode initialBackgroundColorMode = LayerBackgroundMode.backgroundAndColor})
Creates an instance of TextEditorConfigs with optional settings.
const

Properties

canChangeFontScale bool
Determines if the font scale can be change.
final
canToggleBackgroundMode bool
Determines if the background mode can be toggled.
final
canToggleTextAlign bool
Determines if the text alignment options can be toggled.
final
customTextStyles List<TextStyle>?
Allow users to select a different font style
final
enabled bool
Indicates whether the text editor is enabled.
final
hashCode int
The hash code for this object.
no setterinherited
initFontScale double
The initial font scale for text.
final
initFontSize double
The initial font size for text.
final
initialBackgroundColorMode LayerBackgroundMode
The initial background color mode for the layer.
final
initialTextAlign TextAlign
The initial text alignment for the layer.
final
maxFontScale double
The max font font scale for text.
final
minFontScale double
The min font font scale for text.
final
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