FSTypography.fromBaseTextStyle constructor
FSTypography.fromBaseTextStyle(
- TextStyle base
Create typography from base text style with font fallbacks
Implementation
factory FSTypography.fromBaseTextStyle(TextStyle base) {
return FSTypography(
displayLarge: base.copyWith(
fontSize: 57,
fontWeight: FontWeight.w400,
height: 1.12,
letterSpacing: -0.25,
),
displayMedium: base.copyWith(
fontSize: 45,
fontWeight: FontWeight.w400,
height: 1.16,
letterSpacing: 0,
),
displaySmall: base.copyWith(
fontSize: 36,
fontWeight: FontWeight.w400,
height: 1.22,
letterSpacing: 0,
),
headlineLarge: base.copyWith(
fontSize: 32,
fontWeight: FontWeight.w400,
height: 1.25,
letterSpacing: 0,
),
headlineMedium: base.copyWith(
fontSize: 28,
fontWeight: FontWeight.w400,
height: 1.29,
letterSpacing: 0,
),
headlineSmall: base.copyWith(
fontSize: 24,
fontWeight: FontWeight.w400,
height: 1.33,
letterSpacing: 0,
),
titleLarge: base.copyWith(
fontSize: 22,
fontWeight: FontWeight.w500,
height: 1.27,
letterSpacing: 0,
),
titleMedium: base.copyWith(
fontSize: 16,
fontWeight: FontWeight.w500,
height: 1.5,
letterSpacing: 0.15,
),
titleSmall: base.copyWith(
fontSize: 14,
fontWeight: FontWeight.w500,
height: 1.43,
letterSpacing: 0.1,
),
bodyLarge: base.copyWith(
fontSize: 16,
fontWeight: FontWeight.w400,
height: 1.5,
letterSpacing: 0.5,
),
bodyMedium: base.copyWith(
fontSize: 14,
fontWeight: FontWeight.w400,
height: 1.43,
letterSpacing: 0.25,
),
bodySmall: base.copyWith(
fontSize: 12,
fontWeight: FontWeight.w400,
height: 1.33,
letterSpacing: 0.4,
),
labelLarge: base.copyWith(
fontSize: 14,
fontWeight: FontWeight.w500,
height: 1.43,
letterSpacing: 0.1,
),
labelMedium: base.copyWith(
fontSize: 12,
fontWeight: FontWeight.w500,
height: 1.33,
letterSpacing: 0.5,
),
labelSmall: base.copyWith(
fontSize: 11,
fontWeight: FontWeight.w500,
height: 1.45,
letterSpacing: 0.5,
),
);
}