JsonText constructor

JsonText(
  1. dynamic data, {
  2. Map<String, dynamic> args = const {},
  3. JsonWidgetRegistry? registry,
  4. Locale? locale,
  5. int? maxLines,
  6. TextOverflow? overflow,
  7. Color? selectionColor,
  8. String? semanticsLabel,
  9. bool? softWrap,
  10. StrutStyle? strutStyle,
  11. TextStyle? style,
  12. TextAlign? textAlign,
  13. TextDirection? textDirection,
  14. TextHeightBehavior? textHeightBehavior,
  15. double? textScaleFactor,
  16. TextScaler? textScaler,
  17. TextWidthBasis? textWidthBasis,
})

Implementation

JsonText(
  this.data, {
  Map<String, dynamic> args = const {},
  JsonWidgetRegistry? registry,
  this.locale,
  this.maxLines,
  this.overflow,
  this.selectionColor,
  this.semanticsLabel,
  this.softWrap,
  this.strutStyle,
  this.style,
  this.textAlign,
  this.textDirection,
  this.textHeightBehavior,
  this.textScaleFactor,
  this.textScaler,
  this.textWidthBasis,
}) : super(
        jsonWidgetArgs: JsonTextBuilderModel.fromDynamic(
          {
            'text': data,
            'locale': locale,
            'maxLines': maxLines,
            'overflow': overflow,
            'selectionColor': selectionColor,
            'semanticsLabel': semanticsLabel,
            'softWrap': softWrap,
            'strutStyle': strutStyle,
            'style': style,
            'textAlign': textAlign,
            'textDirection': textDirection,
            'textHeightBehavior': textHeightBehavior,
            'textScaleFactor': textScaleFactor,
            'textScaler': textScaler,
            'textWidthBasis': textWidthBasis,
            ...args,
          },
          args: args,
          registry: registry,
        ),
        jsonWidgetBuilder: () => JsonTextBuilder(
          args: JsonTextBuilderModel.fromDynamic(
            {
              'text': data,
              'locale': locale,
              'maxLines': maxLines,
              'overflow': overflow,
              'selectionColor': selectionColor,
              'semanticsLabel': semanticsLabel,
              'softWrap': softWrap,
              'strutStyle': strutStyle,
              'style': style,
              'textAlign': textAlign,
              'textDirection': textDirection,
              'textHeightBehavior': textHeightBehavior,
              'textScaleFactor': textScaleFactor,
              'textScaler': textScaler,
              'textWidthBasis': textWidthBasis,
              ...args,
            },
            args: args,
            registry: registry,
          ),
        ),
        jsonWidgetType: JsonTextBuilder.kType,
      );