You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
828 B
30 lines
828 B
import 'package:teso/Classes/TesoUser.dart';
|
|
|
|
class TokenHandler {
|
|
String tokenTeso;
|
|
String tokenFirebase;
|
|
TesoUser user;
|
|
|
|
TokenHandler({this.tokenTeso, this.user, this.tokenFirebase});
|
|
|
|
factory TokenHandler.fromJSON(Map<String, dynamic> json) {
|
|
return TokenHandler(
|
|
tokenTeso: json['tokenTeso'],
|
|
tokenFirebase: json['tokenFirebase'] != null ? json['tokenFirebase'] : "",
|
|
user: TesoUser.fromJSON(json['user']),
|
|
);
|
|
}
|
|
|
|
Map<dynamic, dynamic> toJson() {
|
|
final Map<dynamic, dynamic> data = Map<dynamic, dynamic>();
|
|
data['tokenTeso'] = this.tokenTeso;
|
|
data['tokenFirebase'] = this.tokenFirebase;
|
|
data['user'] = this.user;
|
|
return data;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return '{"user": "$user", "tokenTeso": "$tokenTeso", "tokenFirebase": "$tokenFirebase"}';
|
|
}
|
|
}
|
|
|