Benefit.fromJson constructor

Benefit.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory Benefit.fromJson(Map<String, Object?> json) {
  final type = json['type'] as String;
  return Benefit(
    type: type,
    value: (json[type] as Map).cast<String, Object?>(),
  );
}