TextEditor constructor

TextEditor({
  1. required List<String> fonts,
  2. required void onEditCompleted(
    1. TextStyle,
    2. TextAlign,
    3. String
    ),
  3. List<Color>? paletteColors,
  4. Color? backgroundColor,
  5. String text = '',
  6. TextStyle? textStyle,
  7. TextAlign? textAlingment,
  8. double? minFontSize = 1,
  9. double? maxFontSize = 100,
  10. ValueChanged<TextAlign>? onTextAlignChanged,
  11. ValueChanged<TextStyle>? onTextStyleChanged,
  12. ValueChanged<String>? onTextChanged,
  13. EditorDecoration? decoration,
})

Create a TextEditor widget

fonts list of font families that you want to use in editor.

After edit process completed, onEditCompleted callback will be called with new textStyle, textAlingment and text value

Implementation

TextEditor({
  required this.fonts,
  required this.onEditCompleted,
  this.paletteColors,
  this.backgroundColor,
  this.text = '',
  this.textStyle,
  this.textAlingment,
  this.minFontSize = 1,
  this.maxFontSize = 100,
  this.onTextAlignChanged,
  this.onTextStyleChanged,
  this.onTextChanged,
  this.decoration,
});