Style constructor
Style({
- Color? backgroundColor = Colors.transparent,
- Color? color,
- TextDirection? direction,
- Display? display,
- String? fontFamily,
- List<
String> ? fontFamilyFallback, - List<
FontFeature> ? fontFeatureSettings, - FontSize? fontSize,
- FontStyle? fontStyle,
- FontWeight? fontWeight,
- double? height,
- LineHeight? lineHeight,
- double? letterSpacing,
- ListStyleType? listStyleType,
- ListStylePosition? listStylePosition,
- 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,
- Widget? markerContent,
- int? maxLines,
- TextOverflow? textOverflow,
- TextTransform? textTransform = TextTransform.none,
Implementation
Style({
this.backgroundColor = Colors.transparent,
this.color,
this.direction,
this.display,
this.fontFamily,
this.fontFamilyFallback,
this.fontFeatureSettings,
this.fontSize,
this.fontStyle,
this.fontWeight,
this.height,
this.lineHeight,
this.letterSpacing,
this.listStyleType,
this.listStylePosition,
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,
this.textTransform = TextTransform.none,
}) {
if (alignment == null &&
(display == Display.BLOCK || display == Display.LIST_ITEM)) {
alignment = Alignment.centerLeft;
}
}