JsonRichText constructor

JsonRichText({
  1. Map<String, dynamic> args = const {},
  2. JsonWidgetRegistry? registry,
  3. Locale? locale,
  4. int? maxLines,
  5. TextOverflow overflow = TextOverflow.clip,
  6. Color? selectionColor,
  7. SelectionRegistrar? selectionRegistrar,
  8. bool softWrap = true,
  9. StrutStyle? strutStyle,
  10. required dynamic text,
  11. TextAlign textAlign = TextAlign.start,
  12. TextDirection? textDirection,
  13. TextHeightBehavior? textHeightBehavior,
  14. double textScaleFactor = 1.0,
  15. TextScaler textScaler = TextScaler.noScaling,
  16. 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,
      );