JsonRichText constructor
JsonRichText({
- Map<
String, dynamic> args = const {}, - JsonWidgetRegistry? registry,
- Locale? locale,
- int? maxLines,
- TextOverflow overflow = TextOverflow.clip,
- Color? selectionColor,
- SelectionRegistrar? selectionRegistrar,
- bool softWrap = true,
- StrutStyle? strutStyle,
- required dynamic text,
- TextAlign textAlign = TextAlign.start,
- TextDirection? textDirection,
- TextHeightBehavior? textHeightBehavior,
- double textScaleFactor = 1.0,
- TextScaler textScaler = TextScaler.noScaling,
- TextWidthBasis textWidthBasis = TextWidthBasis.parent,
Implementation
JsonRichText({
Map<String, dynamic> args = const {},
JsonWidgetRegistry? registry,
this.locale,
this.maxLines,
this.overflow = TextOverflow.clip,
this.selectionColor,
this.selectionRegistrar,
this.softWrap = true,
this.strutStyle,
required this.text,
this.textAlign = TextAlign.start,
this.textDirection,
this.textHeightBehavior,
this.textScaleFactor = 1.0,
this.textScaler = TextScaler.noScaling,
this.textWidthBasis = TextWidthBasis.parent,
}) : super(
jsonWidgetArgs: JsonRichTextBuilderModel.fromDynamic(
{
'locale': locale,
'maxLines': maxLines,
'overflow': overflow,
'selectionColor': selectionColor,
'selectionRegistrar': selectionRegistrar,
'softWrap': softWrap,
'strutStyle': strutStyle,
'text': text,
'textAlign': textAlign,
'textDirection': textDirection,
'textHeightBehavior': textHeightBehavior,
'textScaleFactor': textScaleFactor,
'textScaler': textScaler,
'textWidthBasis': textWidthBasis,
...args,
},
args: args,
registry: registry,
),
jsonWidgetBuilder: () => JsonRichTextBuilder(
args: JsonRichTextBuilderModel.fromDynamic(
{
'locale': locale,
'maxLines': maxLines,
'overflow': overflow,
'selectionColor': selectionColor,
'selectionRegistrar': selectionRegistrar,
'softWrap': softWrap,
'strutStyle': strutStyle,
'text': text,
'textAlign': textAlign,
'textDirection': textDirection,
'textHeightBehavior': textHeightBehavior,
'textScaleFactor': textScaleFactor,
'textScaler': textScaler,
'textWidthBasis': textWidthBasis,
...args,
},
args: args,
registry: registry,
),
),
jsonWidgetType: JsonRichTextBuilder.kType,
);