toJson method

  1. @override
Map<String, dynamic>? toJson(
  1. NavigationRailThemeData? value
)
override

Implementation

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

  return <String, dynamic>{
    'backgroundColor':
        const NullableColorConverter().toJson(value.backgroundColor),
    'elevation': value.elevation,
    'groupAlignment': value.groupAlignment,
    'labelType': const NullableNavigationRailLabelTypeConverter()
        .toJson(value.labelType),
    'selectedIconTheme': const NullableIconThemeDataConverter()
        .toJson(value.selectedIconTheme),
    'selectedLabelTextStyle': const NullableTextStyleConverter().toJson(
      value.selectedLabelTextStyle,
    ),
    'unselectedIconTheme': const NullableIconThemeDataConverter()
        .toJson(value.unselectedIconTheme),
    'unselectedLabelTextStyle': const NullableTextStyleConverter().toJson(
      value.unselectedLabelTextStyle,
    ),
  };

  throw 'Json_Unsuported_Value';
}