Nested theme is getting generated of dynamic type
Closed this issue · 3 comments
JasCodes commented
As you can see below final dynamic buttonTheme;
of dynamic type is being generated.
// ignore_for_file: unused_element, unused_field
import 'package:client_flutter/barrel.dart';
part 'button_theme.tailor.dart';
@TailorComponent(themes: [])
class _$ButtonTheme {
static const List<TextStyle> textStyle = [];
static const List<Color> color = [];
static const List<double> height = [];
}
// ignore_for_file: unused_element, unused_field
import 'package:client_flutter/barrel.dart';
part 'theme.tailor.dart';
@TailorComponent(themes: [])
class _$GluTheme {
static const List<GluButtonTheme> buttonTheme = [];
}
class GluTheme extends ThemeExtension<GluTheme> with DiagnosticableTreeMixin {
const GluTheme({
required this.buttonTheme,
});
final dynamic buttonTheme;
@override
GluTheme copyWith({
dynamic buttonTheme,
}) {
return GluTheme(
buttonTheme: buttonTheme ?? this.buttonTheme,
);
}
Rongix commented
If the 'GluButtonThem' is generated by Tailor, it is required to annotate it with '@themeExtension'annotation to hint the generator that it is not yet generated
Here is a full example, maybe we could explain it a bit better in the docs; let me know if it works for you
https://github.localhost/#nesting-generated-themeextensions-modular-themes--designsystems