Models for CardData and HomeData
This commit is contained in:
parent
ae25411672
commit
217c914e42
@ -16,7 +16,7 @@ class MyApp extends StatelessWidget {
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.orangeAccent),
|
||||
useMaterial3: true,
|
||||
),
|
||||
home: const MyHomePage(title: 'My Flutter Demo'),
|
||||
home: const MyHomePage(title: 'CourseWork: CandyStore'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
10
lib/models/card_data.dart
Normal file
10
lib/models/card_data.dart
Normal file
@ -0,0 +1,10 @@
|
||||
class CardData {
|
||||
final String flavorName;
|
||||
final String imageUrl;
|
||||
final String description;
|
||||
final String groupName;
|
||||
final int? beanId;
|
||||
|
||||
const CardData(
|
||||
{ required this.flavorName, required this.imageUrl, required this.description, required this.groupName, required this.beanId });
|
||||
}
|
12
lib/models/home_data.dart
Normal file
12
lib/models/home_data.dart
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
import 'package:candystore/models/card_data.dart';
|
||||
|
||||
class HomeData {
|
||||
final List<CardData>? data;
|
||||
final int? nextPage;
|
||||
final int? currentPage;
|
||||
final int? totalPages;
|
||||
|
||||
HomeData({this.data, this.nextPage, this.currentPage, this.totalPages});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user