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?>(), ); }