TextStyleEditor constructor

const TextStyleEditor({
  1. Key? key,
  2. List<Color>? paletteColors,
  3. EditorToolbarAction initialTool = EditorToolbarAction.fontFamilyTool,
  4. dynamic onTextStyleEdited(
    1. TextStyle
    )?,
  5. dynamic onTextAlignEdited(
    1. TextAlign
    )?,
  6. dynamic onCapsLockToggle(
    1. bool
    )?,
  7. dynamic onToolbarActionChanged(
    1. EditorToolbarAction
    )?,
})

Create a TextStyleEditor widget

fonts list of font families that you want to use in editor. textStyle initiate text style. textAlign initiate text alignment.

onTextStyleEdited callback will be called every time textStyle has changed. onTextAlignEdited callback will be called every time textAlign has changed. onCapsLockToggle callback will be called every time caps lock has changed to off or on. onToolbarActionChanged callback will be called every time editor's tool has changed.

Implementation

const TextStyleEditor({
  super.key,
  this.paletteColors,
  this.initialTool = EditorToolbarAction.fontFamilyTool,
  this.onTextStyleEdited,
  this.onTextAlignEdited,
  this.onCapsLockToggle,
  this.onToolbarActionChanged,
});