fromJson method

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

Implementation

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

  return NavigationRailThemeData(
    backgroundColor: const NullableColorConverter().fromJson(
      json['backgroundColor'],
    ),
    elevation: (json['elevation'] as num?)?.toDouble(),
    groupAlignment: (json['groupAlignment'] as num?)?.toDouble(),
    labelType: const NullableNavigationRailLabelTypeConverter().fromJson(
      json['labelType'],
    ),
    selectedIconTheme: const NullableIconThemeDataConverter().fromJson(
      json['selectedIconTheme'],
    ),
    selectedLabelTextStyle: const NullableTextStyleConverter().fromJson(
      json['selectedLabelTextStyle'],
    ),
    unselectedIconTheme: const NullableIconThemeDataConverter().fromJson(
      json['unselectedIconTheme'],
    ),
    unselectedLabelTextStyle: const NullableTextStyleConverter().fromJson(
      json['unselectedLabelTextStyle'],
    ),
  );
}