import 'package:flutter/material.dart'; @immutable class AppMonoText extends ThemeExtension { const AppMonoText({required this.label, required this.body}); final TextStyle label; final TextStyle body; @override AppMonoText copyWith({TextStyle? label, TextStyle? body}) { return AppMonoText(label: label ?? this.label, body: body ?? this.body); } @override AppMonoText lerp(ThemeExtension? other, double t) { if (other is! AppMonoText) return this; return AppMonoText( label: TextStyle.lerp(label, other.label, t) ?? label, body: TextStyle.lerp(body, other.body, t) ?? body, ); } static AppMonoText of(BuildContext context) { final ext = Theme.of(context).extension(); return ext ?? const AppMonoText(label: TextStyle(), body: TextStyle()); } }