-
-
Save VB10/03af867bb33b474dff6c092abffb582d to your computer and use it in GitHub Desktop.
Inner model json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part 'my_order.g.dart'; | |
@JsonSerializable() | |
class MyOrder extends INetworkModel<MyOrder> { | |
String siparisGuid; | |
int siparisNo; | |
String siparisTarih; | |
String aliciAdi; | |
String aliciSoyadi; | |
String teslimatAdres; | |
List<Urunler> urunler; | |
String toplamTutar; | |
@override | |
MyOrder fromJson(Map<String, dynamic> json) => _$MyOrderFromJson(json); | |
@override | |
Map<String, Object> toJson() => _$MyOrderToJson(this); | |
} | |
@JsonSerializable() | |
class Urunler extends INetworkModel<Urunler> { | |
String urunAdi; | |
String urunResim; | |
String paketAdi; | |
int adet; | |
double adetToplami; | |
Urunler({ | |
this.urunAdi, | |
this.urunResim, | |
this.paketAdi, | |
this.adet, | |
this.adetToplami, | |
}); | |
factory Urunler.fromJson(Map<String, dynamic> json) => _$UrunlerFromJson(json); | |
@override | |
Urunler fromJson(Map<String, dynamic> json) => _$UrunlerFromJson(json); | |
@override | |
Map<String, Object> toJson() => _$UrunlerToJson(this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
INetworkModel, örneğimize göre BaseModel olacak sanırım.