generateTextStylesFile static method
String
generateTextStylesFile(
{ - required String requiredConstructor,
- required String classDeclaration,
- required String copyWithArguments,
- required String copyWithReturn,
- required String lerpReturn,
})
Implementation
static String generateTextStylesFile({
required String requiredConstructor,
required String classDeclaration,
required String copyWithArguments,
required String copyWithReturn,
required String lerpReturn,
}) =>
'''import '../base_imports.dart';
final class AppTextThemeExtension
extends ThemeExtension<AppTextThemeExtension> {
const AppTextThemeExtension({
$requiredConstructor
});
$classDeclaration
@override
ThemeExtension<AppTextThemeExtension> copyWith({
$copyWithArguments
}) {
return AppTextThemeExtension(
$copyWithReturn
);
}
@override
ThemeExtension<AppTextThemeExtension> lerp(
covariant ThemeExtension<AppTextThemeExtension>? other,
double t,
) {
if (other is! AppTextThemeExtension) {
return this;
}
return AppTextThemeExtension(
$lerpReturn
);
}
}
''';