Files
Mathew 01a0f1029f Initial commit: app Fideliter client (Flutter)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 21:32:39 +02:00

24 lines
585 B
Dart

/// Une récompense du catalogue que le client peut viser avec ses points.
class Recompense {
final String id;
final String nom;
final double coutPoints;
final bool actif;
const Recompense({
required this.id,
required this.nom,
required this.coutPoints,
this.actif = true,
});
factory Recompense.fromMap(Map<String, dynamic> map) {
return Recompense(
id: map['id'].toString(),
nom: (map['nom'] as String?) ?? '',
coutPoints: (map['cout_points'] as num?)?.toDouble() ?? 0,
actif: (map['actif'] as bool?) ?? true,
);
}
}