fromJson method

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

Implementation

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

  return Shadow(
    blurRadius: ((json['blurRadius'] ?? 0.0) as num).toDouble(),
    color: const NullableColorConverter().fromJson(
      json['color'],
    )!,
    offset: const NullableOffsetConverter().fromJson(
      json['offset'],
    )!,
  );
}