customText static method
TextStyle
customText(
- BuildContext context, {
- Color? color,
- double? sizeFactor,
- String? family,
- FontWeight? weight,
The custom text style for the app. Uses the MediaQuery size factor to adjust the text size.
Implementation
static TextStyle customText(
BuildContext context, {
Color? color,
double? sizeFactor, // MediaQuery size factor
String? family,
FontWeight? weight,
}) {
return TextStyle(
fontSize: MediaQuery.of(context).size.width * (sizeFactor ?? 0.035),
fontWeight: weight ?? FontWeight.w400,
color: color ?? Colors.black,
);
}