4224b3f8
吴启风
feat:支付详情页ui
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import 'package:wow_english/generated/json/base/json_convert_content.dart';
import 'package:wow_english/models/product_entity.dart';
ProductEntity $ProductEntityFromJson(Map<String, dynamic> json) {
final ProductEntity productEntity = ProductEntity();
final String? name = jsonConvert.convert<String>(json['name']);
if (name != null) {
productEntity.name = name;
}
final double? price = jsonConvert.convert<double>(json['price']);
if (price != null) {
productEntity.price = price;
}
return productEntity;
}
Map<String, dynamic> $ProductEntityToJson(ProductEntity entity) {
final Map<String, dynamic> data = <String, dynamic>{};
data['name'] = entity.name;
data['price'] = entity.price;
return data;
}
extension ProductEntityExtension on ProductEntity {
ProductEntity copyWith({
String? name,
double? price,
}) {
return ProductEntity()
..name = name ?? this.name
..price = price ?? this.price;
}
}
|