fromJson method
Implementation
@override
Brightness? fromJson(String? json) {
if (json == null) return null;
return json == 'light'
? Brightness.light
: json == 'dark'
? Brightness.dark
: null;
}
@override
Brightness? fromJson(String? json) {
if (json == null) return null;
return json == 'light'
? Brightness.light
: json == 'dark'
? Brightness.dark
: null;
}