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 autocorrect = true, bool enableSuggestions = true, bool enabled = true, bool showSelectFontStyleBottomBar = false, 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, double minScale = double.negativeInfinity, double maxScale = double.infinity, List<
TextStyle> ? customTextStyles, LayerBackgroundMode initialBackgroundColorMode = LayerBackgroundMode.backgroundAndColor}) -
Creates an instance of TextEditorConfigs with optional settings.
const
Properties
- autocorrect → bool
-
Whether to enable autocorrection.
final
- 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
- enableSuggestions → bool
-
Whether to show input suggestions as the user types.
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
- maxScale → double
-
The maximum scale factor from the layer.
final
- minFontScale → double
-
The min font font scale for text.
final
- minScale → double
-
The minimum scale factor from the layer.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showSelectFontStyleBottomBar → bool
-
Determines if the editor show a bottom bar where the user can select
different font styles.
final
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