toJson method

  1. @override
String? toJson(
  1. Brightness? object
)
override

Implementation

@override
String? toJson(Brightness? object) {
  if (object == null) return null;

  switch (object) {
    case Brightness.dark:
      return 'dark';

    case Brightness.light:
      return 'light';
  }
}