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 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 toJson() { final Map data = new Map(); 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; } }