Text class

DSL node for a Text widget.

Usage

Text(
  'Hello, World!',
  key: Key('headline'),
  fontSize: 24,
  color: 'Colors.indigo.shade700',
  fontWeight: 'bold',
  textAlign: 'center',
  maxLines: 2,
  overflow: 'ellipsis',
  letterSpacing: 1.2,
  height: 1.5,
  fontFamily: 'Roboto',
  decoration: 'underline',
)

Supported fontWeight: normal, bold, w100w900 Supported textAlign: left, right, center, justify, start, end Supported overflow: ellipsis, clip, fade, visible Supported decoration: underline, lineThrough, overline, none

Inheritance

Constructors

Text(String data, {Key? key, double? fontSize, String? color, String? fontWeight, String? textAlign, int? maxLines, String? overflow, double? letterSpacing, double? height, String? fontFamily, String? decoration, String? decorationColor})

Properties

color String?
final
data String
final
decoration String?
final
decorationColor String?
final
fontFamily String?
final
fontSize double?
final
fontWeight String?
final
hashCode int
The hash code for this object.
no setterinherited
height double?
final
letterSpacing double?
final
maxLines int?
final
overflow String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textAlign String?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialises this node and all its children into the SDUI JSON format.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited