extensions property
Set<ThemeExtension>
get
extensions
All FScalableExtensions defined in this typography.
Creating and passing a FScalableExtension to FTypography
class AppTypography extends FScalableExtension<AppTypography> {
final TextStyle code;
const AppTypography({required this.code});
@override
AppTypography copyWith({TextStyle? code}) => AppTypography(code: code ?? this.code);
@override
AppTypography lerp(covariant AppTypography? other, double t) =>
other == null ? this : AppTypography(code: TextStyle.lerp(code, other.code, t)!);
@override
AppTypography scale({double sizeScalar = 1.0}) =>
AppTypography(code: code.copyWith(fontSize: (code.fontSize ?? 14) * sizeScalar));
}
final code = context.theme.typography.extension<AppTypography>().code;
Implementation
Set<ThemeExtension<dynamic>> get extensions => _extensions.values.toSet();