labelMedium method
Text
labelMedium({
- Color? color,
- double? fontSize,
- FontWeight? fontWeight,
- FontStyle? fontStyle,
- double? letterSpacing,
- double? wordSpacing,
- TextBaseline? textBaseline,
- double? height,
- Locale? locale,
- Paint? foreground,
- Paint? background,
- List<
Shadow> ? shadows, - List<
FontFeature> ? fontFeatures, - TextDecoration? decoration,
- Color? decorationColor,
- TextDecorationStyle? decorationStyle,
- double? decorationThickness,
- String? fontFamily,
- List<
String> ? fontFamilyFallback, - String? package,
- TextOverflow? overflow,
- TextDecoration? overline,
- Color? overlineColor,
- TextDecorationStyle? overlineStyle,
- double? overlineThickness,
- TextDecoration? underline,
- Color? underlineColor,
- TextDecorationStyle? underlineStyle,
- double? underlineThickness,
- TextHeightBehavior? textHeightBehavior,
Set the Style to use labelMedium.
Implementation
Text labelMedium({
Color? color,
double? fontSize,
FontWeight? fontWeight,
FontStyle? fontStyle,
double? letterSpacing,
double? wordSpacing,
TextBaseline? textBaseline,
double? height,
Locale? locale,
Paint? foreground,
Paint? background,
List<Shadow>? shadows,
List<FontFeature>? fontFeatures,
TextDecoration? decoration,
Color? decorationColor,
TextDecorationStyle? decorationStyle,
double? decorationThickness,
String? fontFamily,
List<String>? fontFamilyFallback,
String? package,
TextOverflow? overflow,
TextDecoration? overline,
Color? overlineColor,
TextDecorationStyle? overlineStyle,
double? overlineThickness,
TextDecoration? underline,
Color? underlineColor,
TextDecorationStyle? underlineStyle,
double? underlineThickness,
TextHeightBehavior? textHeightBehavior,
}) {
TextStyle textStyle = TextStyle(
color: color,
fontSize: fontSize,
fontWeight: fontWeight,
fontStyle: fontStyle,
letterSpacing: letterSpacing,
wordSpacing: wordSpacing,
textBaseline: textBaseline,
height: height,
locale: locale,
foreground: foreground,
background: background,
shadows: shadows,
fontFeatures: fontFeatures,
decoration: decoration,
decorationColor: decorationColor,
decorationStyle: decorationStyle,
decorationThickness: decorationThickness,
fontFamily: fontFamily,
fontFamilyFallback: fontFamilyFallback,
package: package,
overflow: overflow,
);
if (style == null) {
return copyWith(
style: Theme.of(_context).textTheme.labelMedium?.merge(textStyle));
}
return setStyle(Theme.of(_context).textTheme.labelMedium?.merge(textStyle));
}