12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import 'UserMode.dart';
- class LoginMode {
- String? accessToken;
- User? user;
- String? tutorial;
- String? swoftdownload;
- String? affurl;
- String? userLoginUrl;
- String? userBuy;
- String? userTicket;
- String? clashConfig;
- LoginMode(
- {this.accessToken,
- this.user,
- this.tutorial,
- this.swoftdownload,
- this.affurl,
- this.userLoginUrl,
- this.userBuy,
- this.userTicket,
- this.clashConfig});
- LoginMode.fromJson(Map<String, dynamic> json) {
- accessToken = json['access_token'];
- user = json['user'] != null ? User.fromJson(json['user']) : null;
- tutorial = json['tutorial'];
- swoftdownload = json['swoftdownload'];
- affurl = json['affurl'];
- userLoginUrl = json['user_login_url'];
- userBuy = json['user_buy'];
- userTicket = json['user_ticket'];
- clashConfig = json['clash_config'];
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['access_token'] = this.accessToken;
- if (this.user != null) {
- data['user'] = this.user!.toJson();
- }
- data['tutorial'] = this.tutorial;
- data['swoftdownload'] = this.swoftdownload;
- data['affurl'] = this.affurl;
- data['user_login_url'] = this.userLoginUrl;
- data['user_buy'] = this.userBuy;
- data['user_ticket'] = this.userTicket;
- data['clash_config'] = this.clashConfig;
- return data;
- }
- }
|