ListItemComponentViewModel constructor
ListItemComponentViewModel({
- required String nodeId,
- DateTime? createdAt,
- double? maxWidth,
- EdgeInsetsGeometry padding = EdgeInsets.zero,
- double opacity = 1.0,
- required int indent,
- required AttributedText text,
- required AttributionStyleBuilder textStyleBuilder,
- InlineWidgetBuilderChain inlineWidgetBuilders = const [],
- TextDirection textDirection = TextDirection.ltr,
- TextAlign textAlignment = TextAlign.left,
- TextSelection? selection,
- required Color selectionColor,
- bool 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>[],
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;
}