FTextStyle constructor
FTextStyle({
- Key? key,
- FColorI? fColor,
- double? height,
- FontWeight? fontWeight,
- double? fontSize,
- required FTypographyType fTypographyType,
Implementation
factory FTextStyle({
Key? key,
FColorI? fColor,
double? height,
FontWeight? fontWeight,
double? fontSize,
required FTypographyType fTypographyType,
}) {
switch (fTypographyType) {
case FTypographyType.headlineExtraLarge:
return FTextStyle._(
fontSize: fontSize ?? _headlineExtraLarge,
fontWeight: fontWeight ?? FontWeight.w600,
fColor: fColor,
height: height,
);
case FTypographyType.headlineLarge:
return FTextStyle._(
fontSize: fontSize ?? _headlineLarge,
fontWeight: fontWeight ?? FontWeight.w600,
fColor: fColor,
height: height,
);
case FTypographyType.headlineMedium:
return FTextStyle._(
fontSize: fontSize ?? _headlineMedium,
fontWeight: fontWeight ?? FontWeight.w500,
fColor: fColor,
height: height,
);
case FTypographyType.headlineSmall:
return FTextStyle._(
fontSize: fontSize ?? _headlineSmall,
fontWeight: fontWeight ?? FontWeight.w600,
fColor: fColor,
height: height,
);
case FTypographyType.bodyLarge:
return FTextStyle._(
fontSize: fontSize ?? _bodyLarge,
fontWeight: FontWeight.w400,
fColor: fColor,
height: height,
);
case FTypographyType.bodyMedium:
return FTextStyle._(
fontSize: fontSize ?? _bodyMedium,
fontWeight: fontWeight ?? FontWeight.w400,
fColor: fColor,
height: height,
);
case FTypographyType.bodySmall:
return FTextStyle._(
fontSize: fontSize ?? _bodySmall,
fontWeight: fontWeight ?? FontWeight.w400,
fColor: fColor,
height: height,
);
}
}