6 changed files with 120 additions and 48 deletions
Unified View
Diff Options
-
69lib/controller/setting/setting_controller.dart
-
47lib/model/mine/app_version.dart
-
3lib/network/api_urls.dart
-
7lib/network/user_api.dart
-
37lib/network/user_api.g.dart
-
5lib/pages/setting/setting_page.dart
@ -0,0 +1,47 @@ |
|||||
|
class AppVersion { |
||||
|
final String? id; |
||||
|
final String? version; |
||||
|
final int? versionCode; |
||||
|
final String? url; |
||||
|
final String? title; |
||||
|
final String? description; |
||||
|
final int? operatingSystem; |
||||
|
final bool? isForcingUpdate; |
||||
|
|
||||
|
AppVersion({ |
||||
|
this.id, |
||||
|
this.version, |
||||
|
this.versionCode, |
||||
|
this.url, |
||||
|
this.title, |
||||
|
this.description, |
||||
|
this.operatingSystem, |
||||
|
this.isForcingUpdate, |
||||
|
}); |
||||
|
|
||||
|
factory AppVersion.fromJson(Map<String, dynamic> json) { |
||||
|
return AppVersion( |
||||
|
id: json['id'] as String?, |
||||
|
version: json['version'] as String?, |
||||
|
versionCode: json['versionCode'] as int?, |
||||
|
url: json['url'] as String?, |
||||
|
title: json['title'] as String?, |
||||
|
description: json['description'] as String?, |
||||
|
operatingSystem: json['operatingSystem'] as int?, |
||||
|
isForcingUpdate: json['isForcingUpdate'] as bool?, |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
Map<String, dynamic> toJson() { |
||||
|
return { |
||||
|
'id': id, |
||||
|
'version': version, |
||||
|
'versionCode': versionCode, |
||||
|
'url': url, |
||||
|
'title': title, |
||||
|
'description': description, |
||||
|
'operatingSystem': operatingSystem, |
||||
|
'isForcingUpdate': isForcingUpdate, |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save