fromJson method
Implementation
@override
ColorScheme? fromJson(Map<String, dynamic>? json) {
if (json == null) return null;
return ColorScheme(
background: const NullableColorConverter().fromJson(
json['background'],
)!,
brightness: const NullableBrightnessConverter().fromJson(
json['brightness'],
)!,
error: const NullableColorConverter().fromJson(
json['error'],
)!,
onBackground: const NullableColorConverter().fromJson(
json['onBackground'],
)!,
onError: const NullableColorConverter().fromJson(
json['onError'],
)!,
onPrimary: const NullableColorConverter().fromJson(
json['onPrimary'],
)!,
onSecondary: const NullableColorConverter().fromJson(
json['onSecondary'],
)!,
onSurface: const NullableColorConverter().fromJson(
json['onSurface'],
)!,
primary: const NullableColorConverter().fromJson(
json['primary'],
)!,
primaryContainer: const NullableColorConverter().fromJson(
json['primaryContainer'],
),
onPrimaryContainer: const NullableColorConverter().fromJson(
json['onPrimaryContainer'],
),
secondary: const NullableColorConverter().fromJson(
json['secondary'],
)!,
secondaryContainer: const NullableColorConverter().fromJson(
json['secondaryContainer'],
),
onSecondaryContainer: const NullableColorConverter().fromJson(
json['onSecondaryContainer'],
),
surface: const NullableColorConverter().fromJson(
json['surface'],
)!,
);
}