JsonTextBuilderModel class
Creates a text widget.
If the style argument is null, the text will use the style from the closest enclosing DefaultTextStyle.
The overflow property's behavior is affected by the softWrap argument. If the softWrap is true or null, the glyph causing overflow, and those that follow, will not be rendered. Otherwise, it will be shown with the given overflow option.
- Inheritance
-
- Object
- JsonClass
- JsonWidgetBuilderModel
- JsonTextBuilderModel
Constructors
-
JsonTextBuilderModel(Map<
String, dynamic> args, {required dynamic data, Locale? locale, int? maxLines, TextOverflow? overflow, Color? selectionColor, String? semanticsLabel, bool? softWrap, StrutStyle? strutStyle, TextStyle? style, TextAlign? textAlign, TextDirection? textDirection, TextHeightBehavior? textHeightBehavior, double? textScaleFactor, TextScaler? textScaler, TextWidthBasis? textWidthBasis}) -
const
Properties
-
args
→ Map<
String, dynamic> -
finalinherited
- data → dynamic
-
The text to display.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale → Locale?
-
Used to select a font when the same Unicode character can
be rendered differently, depending on the locale.
final
- maxLines → int?
-
An optional maximum number of lines for the text to span, wrapping if necessary.
If the text exceeds the given number of lines, it will be truncated according
to overflow.
final
- overflow → TextOverflow?
-
How visual overflow should be handled.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionColor → Color?
-
The color to use when painting the selection.
final
- semanticsLabel → String?
-
An alternative semantics label for this text.
final
- softWrap → bool?
-
Whether the text should break at soft line breaks.
final
- strutStyle → StrutStyle?
-
The strut style to use. Strut style defines the strut, which sets minimum
vertical layout metrics.
final
- style → TextStyle?
-
If non-null, the style to use for this text.
final
- textAlign → TextAlign?
-
How the text should be aligned horizontally.
final
- textDirection → TextDirection?
-
The directionality of the text.
final
- textHeightBehavior → TextHeightBehavior?
-
Defines how to apply TextStyle.height over and under text.
final
- textScaleFactor → double?
-
Deprecated. Will be removed in a future version of Flutter. Use
textScaler instead.
final
- textScaler → TextScaler?
-
The font scaling strategy to use when laying out and rendering the text.
final
- textWidthBasis → TextWidthBasis?
-
Defines how to measure the width of the rendered text.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Abstract function that concrete classes must implement. This must encode
the internal data model to a JSON compatible representation.
override
-
toString(
) → String -
Returns the string encoded JSON representation for this class. This will
remove all null values and empty collections from the returned string.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromDynamic(
dynamic map, {Map< String, dynamic> args = const {}, JsonWidgetRegistry? registry}) → JsonTextBuilderModel -
maybeFromDynamic(
dynamic map, {Map< String, dynamic> args = const {}, JsonWidgetRegistry? registry}) → JsonTextBuilderModel?