TextEditorConfigs constructor

const TextEditorConfigs({
  1. bool enabled = true,
  2. bool canToggleTextAlign = true,
  3. bool canToggleBackgroundMode = true,
  4. bool canChangeFontScale = true,
  5. double initFontSize = 24.0,
  6. TextAlign initialTextAlign = TextAlign.center,
  7. double initFontScale = 1.0,
  8. double maxFontScale = 3.0,
  9. double minFontScale = 0.3,
  10. List<TextStyle>? customTextStyles,
  11. 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.enabled = true,
  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.customTextStyles,
  this.initialBackgroundColorMode = LayerBackgroundMode.backgroundAndColor,
}) : assert(initFontSize > 0, 'initFontSize must be positive');