add favourites tool

This commit is contained in:
2025-04-17 13:09:12 +02:00
parent 5fcf8bed47
commit 117e7dbb57
7 changed files with 454 additions and 67 deletions

View File

@@ -3,12 +3,16 @@ class MIHLoyaltyCard {
final String app_id;
final String shop_name;
final String card_number;
final String favourite;
final int priority_index;
const MIHLoyaltyCard({
required this.idloyalty_cards,
required this.app_id,
required this.shop_name,
required this.card_number,
required this.favourite,
required this.priority_index,
});
factory MIHLoyaltyCard.fromJson(Map<String, dynamic> json) {
@@ -18,12 +22,16 @@ class MIHLoyaltyCard {
"app_id": String app_id,
"shop_name": String shop_name,
"card_number": String card_number,
"favourite": String favourite,
"priority_index": int priority_index,
} =>
MIHLoyaltyCard(
idloyalty_cards: idloyalty_cards,
app_id: app_id,
shop_name: shop_name,
card_number: card_number,
favourite: favourite,
priority_index: priority_index,
),
_ => throw const FormatException('Failed to load loyalty card objects'),
};