toJson method

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

Implementation

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

  return {
    'fontFamily': value.fontFamily,
    'fontFamilyFallback': value.fontFamilyFallback,
    'fontSize': value.fontSize,
    'fontStyle': const NullableFontStyleConverter().toJson(value.fontStyle),
    'fontWeight':
        const NullableFontWeightConverter().toJson(value.fontWeight),
    'forceStrutHeight': value.forceStrutHeight,
    'height': value.height,
    'leading': value.leading,
  };

  throw 'Json_Unsuported_Value';
}