Files
SigHej/app/lib/models/match_result.dart
Henrik Jess Nielsen 99e9b509a0
Some checks failed
Backend CI / test (push) Has been cancelled
Flutter CI / analyze-and-test (push) Has been cancelled
eksplicit mapping af envs
2026-05-12 18:21:25 +02:00

21 lines
568 B
Dart

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