导航栏代码,配置文件
This commit is contained in:
19
ln_jq_app/lib/common/model/base_model.dart
Normal file
19
ln_jq_app/lib/common/model/base_model.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
class BaseModel {
|
||||
bool? success;
|
||||
String? type;
|
||||
String? url;
|
||||
|
||||
BaseModel({this.success, this.type, this.url});
|
||||
|
||||
factory BaseModel.fromJson(Map<String, dynamic> json) => BaseModel(
|
||||
success: json['success']?.toString().contains("true"),
|
||||
type: json['type']?.toString(),
|
||||
url: json['url']?.toString(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
if (success != null) 'success': success,
|
||||
if (type != null) 'type': type,
|
||||
if (url != null) 'url': url,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user