toJson method

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

Implementation

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

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