Adding model for mapping

This commit is contained in:
nikbel2004@outlook.com 2024-12-18 17:03:11 +04:00
parent 64d27a2edc
commit 7e1a773984
2 changed files with 11 additions and 9 deletions

View File

@ -1,12 +1,10 @@
import 'package:candystore/models/card_data.dart';
class HomeData {
class CandyData {
final List<CardData>? data;
final int? nextPage;
final int? currentPage;
final int? totalPages;
HomeData({this.data, this.nextPage, this.currentPage, this.totalPages});
}
CandyData({this.data, this.nextPage, this.currentPage, this.totalPages});
}

View File

@ -2,9 +2,13 @@ class CardData {
final String flavorName;
final String imageUrl;
final String description;
final String groupName;
final List<String> groupName;
final int? beanId;
const CardData(
{ required this.flavorName, required this.imageUrl, required this.description, required this.groupName, required this.beanId });
}
const CardData(
{required this.flavorName,
required this.imageUrl,
required this.description,
required this.groupName,
required this.beanId});
}