Style constructor
Style({
- Color? backgroundColor = Colors.transparent,
- Color? color,
- TextDirection? direction,
- Display? display,
- String? fontFamily,
- List<
FontFeature> ? fontFeatureSettings, - FontSize? fontSize,
- FontStyle? fontStyle,
- FontWeight? fontWeight,
- double? height,
- LineHeight? lineHeight,
- double? letterSpacing,
- ListStyleType? listStyleType,
- ListStylePosition? listStylePosition = ListStylePosition.OUTSIDE,
- EdgeInsets? padding,
- EdgeInsets? margin,
- TextAlign? textAlign,
- TextDecoration? textDecoration,
- Color? textDecorationColor,
- TextDecorationStyle? textDecorationStyle,
- double? textDecorationThickness,
- List<
Shadow> ? textShadow, - VerticalAlign? verticalAlign,
- WhiteSpace? whiteSpace,
- double? width,
- double? wordSpacing,
- String? before,
- String? after,
- Border? border,
- Alignment? alignment,
- String? markerContent,
- int? maxLines,
- TextOverflow? textOverflow,
Implementation
Style({
this.backgroundColor = Colors.transparent,
this.color,
this.direction,
this.display,
this.fontFamily,
this.fontFeatureSettings,
this.fontSize,
this.fontStyle,
this.fontWeight,
this.height,
this.lineHeight,
this.letterSpacing,
this.listStyleType,
this.listStylePosition = ListStylePosition.OUTSIDE,
this.padding,
this.margin,
this.textAlign,
this.textDecoration,
this.textDecorationColor,
this.textDecorationStyle,
this.textDecorationThickness,
this.textShadow,
this.verticalAlign,
this.whiteSpace,
this.width,
this.wordSpacing,
this.before,
this.after,
this.border,
this.alignment,
this.markerContent,
this.maxLines,
this.textOverflow,
}) {
if (this.alignment == null && (display == Display.BLOCK || display == Display.LIST_ITEM)) {
this.alignment = Alignment.centerLeft;
}
}