fromJson method
Implementation
@override
AppBarTheme? fromJson(Map<String, dynamic>? json) {
if (json == null) return null;
return AppBarTheme(
actionsIconTheme: const NullableIconThemeDataConverter().fromJson(
json['actionsIconTheme'],
),
backgroundColor: const NullableColorConverter().fromJson(
json['backgroundColor'] ?? json['color'],
),
backwardsCompatibility: json['backwardsCompatibility'] == null
? null
: (json['backwardsCompatibility'] as bool),
brightness: const NullableBrightnessConverter().fromJson(
json['brightness'],
),
centerTitle:
json['centerTitle'] == null ? null : (json['centerTitle'] as bool),
elevation: (json['elevation'] as num?)?.toDouble(),
foregroundColor: const NullableColorConverter().fromJson(
json['foregroundColor'],
),
iconTheme: const NullableIconThemeDataConverter().fromJson(
json['iconTheme'],
),
shadowColor: const NullableColorConverter().fromJson(
json['shadowColor'],
),
systemOverlayStyle:
const NullableSystemUiOverlayStyleConverter().fromJson(
json['systemOverlayStyle'],
),
textTheme: const NullableTextThemeConverter().fromJson(
json['textTheme'],
),
titleSpacing: (json['titleSpacing'] as num?)?.toDouble(),
titleTextStyle: const NullableTextStyleConverter().fromJson(
json['titleTextStyle'],
),
toolbarTextStyle: const NullableTextStyleConverter().fromJson(
json['toolbarTextStyle'],
),
);
}