ListItemComponentViewModel constructor

ListItemComponentViewModel({
  1. required String nodeId,
  2. DateTime? createdAt,
  3. double? maxWidth,
  4. EdgeInsetsGeometry padding = EdgeInsets.zero,
  5. double opacity = 1.0,
  6. required int indent,
  7. required AttributedText text,
  8. required AttributionStyleBuilder textStyleBuilder,
  9. InlineWidgetBuilderChain inlineWidgetBuilders = const [],
  10. TextDirection textDirection = TextDirection.ltr,
  11. TextAlign textAlignment = TextAlign.left,
  12. TextSelection? selection,
  13. required Color selectionColor,
  14. bool highlightWhenEmpty = false,
  15. TextRange? composingRegion,
  16. bool showComposingRegionUnderline = false,
  17. UnderlineStyle spellingErrorUnderlineStyle = const SquiggleUnderlineStyle(color: Colors.red),
  18. List<TextRange> spellingErrors = const <TextRange>[],
  19. UnderlineStyle grammarErrorUnderlineStyle = const SquiggleUnderlineStyle(color: Colors.blue),
  20. List<TextRange> grammarErrors = const <TextRange>[],
})

Implementation

ListItemComponentViewModel({
  required super.nodeId,
  super.createdAt,
  super.maxWidth,
  super.padding = EdgeInsets.zero,
  super.opacity = 1.0,
  required this.indent,
  required this.text,
  required this.textStyleBuilder,
  this.inlineWidgetBuilders = const [],
  this.textDirection = TextDirection.ltr,
  this.textAlignment = TextAlign.left,
  this.selection,
  required this.selectionColor,
  this.highlightWhenEmpty = false,
  TextRange? composingRegion,
  bool showComposingRegionUnderline = false,
  UnderlineStyle spellingErrorUnderlineStyle = const SquiggleUnderlineStyle(color: Colors.red),
  List<TextRange> spellingErrors = const <TextRange>[],
  UnderlineStyle grammarErrorUnderlineStyle = const SquiggleUnderlineStyle(color: Colors.blue),
  List<TextRange> grammarErrors = const <TextRange>[],
}) {
  this.composingRegion = composingRegion;
  this.showComposingRegionUnderline = showComposingRegionUnderline;

  this.spellingErrorUnderlineStyle = spellingErrorUnderlineStyle;
  this.spellingErrors = spellingErrors;

  this.grammarErrorUnderlineStyle = grammarErrorUnderlineStyle;
  this.grammarErrors = grammarErrors;
}