fromJson method

  1. @override
BottomNavigationBarThemeData? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

@override
BottomNavigationBarThemeData? fromJson(Map<String, dynamic>? json) {
  if (json == null) return null;

  return BottomNavigationBarThemeData(
    backgroundColor: const NullableColorConverter().fromJson(
      json['backgroundColor'],
    ),
    elevation: (json['elevation'] as num?)?.toDouble(),
    selectedIconTheme: const NullableIconThemeDataConverter().fromJson(
      json['selectedIconTheme'],
    ),
    selectedItemColor: const NullableColorConverter().fromJson(
      json['selectedItemColor'],
    ),
    selectedLabelStyle: const NullableTextStyleConverter().fromJson(
      json['selectedLabelStyle'],
    ),
    showSelectedLabels: json['showSelectedLabels'] == null
        ? null
        : (json['showSelectedLabels'] as bool),
    showUnselectedLabels: json['showUnselectedLabels'] == null
        ? null
        : (json['showUnselectedLabels'] as bool),
    type: const NullableBottomNavigationBarTypeConverter().fromJson(
      json['type'],
    ),
    unselectedIconTheme: const NullableIconThemeDataConverter().fromJson(
      json['unselectedIconTheme'],
    ),
    unselectedItemColor: const NullableColorConverter().fromJson(
      json['unselectedItemColor'],
    ),
    unselectedLabelStyle: const NullableTextStyleConverter().fromJson(
      json['unselectedLabelStyle'],
    ),
  );
}