TextEditorConfigs constructor

const TextEditorConfigs({
  1. bool autocorrect = true,
  2. bool enableSuggestions = true,
  3. bool enabled = true,
  4. bool showSelectFontStyleBottomBar = false,
  5. bool canToggleTextAlign = true,
  6. bool canToggleBackgroundMode = true,
  7. bool canChangeFontScale = true,
  8. double initFontSize = 24.0,
  9. TextAlign initialTextAlign = TextAlign.center,
  10. double initFontScale = 1.0,
  11. double maxFontScale = 3.0,
  12. double minFontScale = 0.3,
  13. double minScale = double.negativeInfinity,
  14. double maxScale = double.infinity,
  15. List<TextStyle>? customTextStyles,
  16. LayerBackgroundMode initialBackgroundColorMode = LayerBackgroundMode.backgroundAndColor,
})

Creates an instance of TextEditorConfigs with optional settings.

By default, the text editor is enabled, and most text formatting options are enabled. The initial font size is set to 24.0.

Implementation

const TextEditorConfigs({
  this.autocorrect = true,
  this.enableSuggestions = true,
  this.enabled = true,
  this.showSelectFontStyleBottomBar = false,
  this.canToggleTextAlign = true,
  this.canToggleBackgroundMode = true,
  this.canChangeFontScale = true,
  this.initFontSize = 24.0,
  this.initialTextAlign = TextAlign.center,
  this.initFontScale = 1.0,
  this.maxFontScale = 3.0,
  this.minFontScale = 0.3,
  this.minScale = double.negativeInfinity,
  this.maxScale = double.infinity,
  this.customTextStyles,
  this.initialBackgroundColorMode = LayerBackgroundMode.backgroundAndColor,
})  : assert(initFontSize > 0, 'initFontSize must be positive'),
      assert(maxScale >= minScale,
          'maxScale must be greater than or equal to minScale');