List.generate( checkout.priceDetailsModel.itemTotals!.length, (index) { return Text( "${checkout.priceDetailsModel.itemTotals![index].productname} Qty(${checkout.priceDetailsModel.itemTotals![index].quantity}) ₹ ${checkout.priceDetailsModel.itemTotals![index].totalamount}", style: CustomTextstyle.customHintTextStyle1(13), softWrap: true, ); // _priceRow( // "${checkout.priceDetailsModel.itemTotals![index].productname} Qty(${checkout.priceDetailsModel.itemTotals![index].quantity})", // '₹ ${checkout.priceDetailsModel.itemTotals![index].totalamount}'); }, ), ), class PriceDetailsModel { final List<ItemTotal>? itemTotals; final OrderTotals? orderTotals; PriceDetailsModel({ this.itemTotals, this.orderTotals, }); factory PriceDetailsModel.fromJson(Map<String, dynamic> json) { return PriceDetailsModel( itemTotals: (json['ItemTotals'] as List?) ?.map((item) => ItemTotal.fromJson(item)) .toList(), orderTotals: json['OrderTotals'] != null ? OrderTotals.fromJson(json['OrderTotals']) : null, ); } Map<String, dynamic> toJson() { return { 'ItemTotals': itemTotals?.map((item) => item.toJson()).toList(), 'OrderTotals': orderTotals?.toJson(), }; } } class ItemTotal { final String productname; final double quantity; final double unitPrice; final double subtotal; final double discount; final double totalamount; final double grandtotal; final double taxAmount; final String? imageurl; final String? shape; final bool isveg; final bool isSurpriseGift; final int shopid; ItemTotal({ required this.productname, required this.quantity, required this.unitPrice, required this.subtotal, required this.discount, required this.totalamount, required this.grandtotal, required this.taxAmount, this.imageurl, this.shape, required this.isveg, required this.isSurpriseGift, required this.shopid, }); factory ItemTotal.fromJson(Map<String, dynamic> json) { return ItemTotal( productname: json['productname'] ?? '', quantity: (json['quantity'] as num?)?.toDouble() ?? 0.0, unitPrice: (json['unitPrice'] as num?)?.toDouble() ?? 0.0, subtotal: (json['subtotal'] as num?)?.toDouble() ?? 0.0, discount: (json['discount'] as num?)?.toDouble() ?? 0.0, totalamount: (json['totalamount'] as num?)?.toDouble() ?? 0.0, grandtotal: (json['grandtotal'] as num?)?.toDouble() ?? 0.0, taxAmount: (json['taxAmount'] as num?)?.toDouble() ?? 0.0, imageurl: json['imageurl'], shape: json['shape'], isveg: json['isveg'] ?? false, isSurpriseGift: json['isSurpriseGift'] ?? false, shopid: json['shopid'] ?? 0, ); } Map<String, dynamic> toJson() { return { 'productname': productname, 'quantity': quantity, 'unitPrice': unitPrice, 'subtotal': subtotal, 'discount': discount, 'totalamount': totalamount, 'grandtotal': grandtotal, 'taxAmount': taxAmount, 'imageurl': imageurl, 'shape': shape, 'isveg': isveg, 'isSurpriseGift': isSurpriseGift, 'shopid': shopid, }; } } class OrderTotals { final double subtotal; final double discount; final double totalamount; final double grandtotal; final double taxamount; final double deliverycharge; final double grandtotalwithdeliverycharge; final int shopid; final int variantDetailsId; OrderTotals({ required this.subtotal, required this.discount, required this.totalamount, required this.grandtotal, required this.taxamount, required this.deliverycharge, required this.grandtotalwithdeliverycharge, required this.shopid, required this.variantDetailsId, }); factory OrderTotals.fromJson(Map<String, dynamic> json) { return OrderTotals( subtotal: (json['subtotal'] as num?)?.toDouble() ?? 0.0, discount: (json['discount'] as num?)?.toDouble() ?? 0.0, totalamount: (json['totalamount'] as num?)?.toDouble() ?? 0.0, grandtotal: (json['grandtotal'] as num?)?.toDouble() ?? 0.0, taxamount: (json['taxamount'] as num?)?.toDouble() ?? 0.0, deliverycharge: (json['deliverycharge'] as num?)?.toDouble() ?? 0.0, grandtotalwithdeliverycharge: (json['grandtotalwithdeliverycharge'] as num?)?.toDouble() ?? 0.0, shopid: json['shopid'] ?? 0, variantDetailsId: json['variantDetailsId'] ?? 0, ); } Map<String, dynamic> toJson() { return { 'subtotal': subtotal, 'discount': discount, 'totalamount': totalamount, 'grandtotal': grandtotal, 'taxamount': taxamount, 'deliverycharge': deliverycharge, 'grandtotalwithdeliverycharge': grandtotalwithdeliverycharge, 'shopid': shopid, }; } } i want to put in expansion tile
Sign in to leave a comment
No completed page designs yet.
Completed design pages will appear here when they are ready to preview.
No user flows yet.
The User Flow Agent will generate per-persona navigation diagrams after SRD updates.
No completed page designs yet.
Completed design pages will appear here when they are ready to preview.
No user flows yet.
The User Flow Agent will generate per-persona navigation diagrams after SRD updates.
No comments yet. Be the first!