fromJson method

  1. @override
Brightness? fromJson(
  1. String? json
)
override

Implementation

@override
Brightness? fromJson(String? json) {
  if (json == null) return null;

  return json == 'light'
      ? Brightness.light
      : json == 'dark'
          ? Brightness.dark
          : null;
}