NapaDefaultTextStyle constructor
NapaDefaultTextStyle({
- required NapaTextStyle style,
- TextAlign? textAlign,
- bool softWrap = true,
- TextOverflow overflow = TextOverflow.clip,
- int? maxLines,
- TextWidthBasis textWidthBasis = TextWidthBasis.parent,
- NapaWidget? child,
Implementation
NapaDefaultTextStyle({
required this.style,
this.textAlign,
this.softWrap = true,
this.overflow = TextOverflow.clip,
this.maxLines,
this.textWidthBasis = TextWidthBasis.parent,
this.child,
}) : super(childMode: NapaChildMode.singleChild) {
properties.addAll([
InspectableProperty<NapaTextStyle>(
name: 'style',
getValue: (obj) => style,
setValue: (obj, value, customData) => style = value,
),
InspectableProperty<Enum>(
name: 'textAlign',
nullable: true,
getValue: (obj) => textAlign,
setValue: (obj, value, customData) => textAlign = value,
values: () => TextAlign.values,
),
InspectableProperty<bool>(
name: 'softWrap',
getValue: (obj) => softWrap,
setValue: (obj, value, customData) => softWrap = value,
),
InspectableProperty<Enum>(
name: 'overflow',
getValue: (obj) => overflow,
setValue: (obj, value, customData) => overflow = value,
values: () => TextOverflow.values,
),
InspectableProperty<int>(
name: 'maxLines',
nullable: true,
getValue: (obj) => maxLines,
setValue: (obj, value, customData) => maxLines = value,
),
InspectableProperty<Enum>(
name: 'textWidthBasis',
getValue: (obj) => textWidthBasis,
setValue: (obj, value, customData) => textWidthBasis = value,
values: () => TextWidthBasis.values,
),
]);
}