Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
banner_model.dart
Go to the documentation of this file.
1import '/features/main_menu/domain/entities/banner_entity.dart';
2
3class BannerModel extends BannerEntity {
4 const BannerModel({
5 super.id,
6 super.image,
7 super.name,
8 });
9
10 factory BannerModel.fromJson(Map<String, dynamic> json) {
11 return BannerModel(
12 id: json['id'] as int?,
13 image: json['image'] as String?,
14 name: json['name'] as String?,
15 );
16 }
17
18 Map<String, dynamic> toJson() {
19 return {
20 'id': id,
21 'image': image,
22 'name': name,
23 };
24 }
25}
final String image
const BannerEntity({ this.id, this.image, this.name, })
Map< String, dynamic > toJson()
const BannerModel({ super.id, super.image, super.name, })
final String name