toJson method

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

Implementation

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

  return <String, dynamic>{
    'backgroundColor':
        const NullableColorConverter().toJson(value.backgroundColor),
    'contentTextStyle':
        const NullableTextStyleConverter().toJson(value.contentTextStyle),
    'leadingPadding': const NullableEdgeInsetsGeometryConverter()
        .toJson(value.leadingPadding as EdgeInsets?),
    'padding': const NullableEdgeInsetsGeometryConverter()
        .toJson(value.padding as EdgeInsets?),
  };

  throw 'Json_Unsuported_Value';
}