class MatchResult { final bool match; final List sharedInterests; final bool nudgeSent; const MatchResult({ required this.match, required this.sharedInterests, required this.nudgeSent, }); factory MatchResult.fromJson(Map json) => MatchResult( match: json['match'] as bool? ?? false, sharedInterests: (json['shared_interests'] as List?) ?.map((e) => e as String) .toList() ?? [], nudgeSent: json['nudge_sent'] as bool? ?? false, ); }