@jsonSerializable
class StylingModel {
const StylingModel({this.primary});
final String primary;
}
And the ThemeMode is a built in enum in flutter.
Actually the issue is not that i'm using a non-annotated enum because as you see in the following example the FontWeight is built in flutter and it's working well.
@jsonSerializable
class TypographyType {
const TypographyType({@required this.fontWeight,});
@JsonProperty(enumValues: FontWeight.values)
final FontWeight fontWeight;
}
So i guess that the issue is coming from using two custom generic types in the Map<CustomEnum, CustomClass>, So please help mater @k-paxian
The issue is coming from here
final Map<ThemeMode, StylingModel> styling;
Here is the
StylingModel
And the
ThemeMode
is a built inenum
in flutter. Actually the issue is not that i'm using a non-annotatedenum
because as you see in the following example theFontWeight
is built in flutter and it's working well.So i guess that the issue is coming from using two custom generic types in the
Map<CustomEnum, CustomClass>
, So please help mater @k-paxian