toJson method
Implementation
@override
String? toJson(Brightness? object) {
if (object == null) return null;
switch (object) {
case Brightness.dark:
return 'dark';
case Brightness.light:
return 'light';
}
}
@override
String? toJson(Brightness? object) {
if (object == null) return null;
switch (object) {
case Brightness.dark:
return 'dark';
case Brightness.light:
return 'light';
}
}