diff --git a/lib/src/model/auth/authentication_data.dart b/lib/src/model/auth/authentication_data.dart index 3a561798..1f4cfc31 100644 --- a/lib/src/model/auth/authentication_data.dart +++ b/lib/src/model/auth/authentication_data.dart @@ -22,10 +22,10 @@ */ class AuthenticationData { - String type; + String? type; String? session; - AuthenticationData({required this.type, this.session}); + AuthenticationData({this.type, this.session}); AuthenticationData.fromJson(Map json) : type = json['type'], @@ -33,7 +33,7 @@ class AuthenticationData { Map toJson() { final data = {}; - data['type'] = type; + if (type != null) data['type'] = type; if (session != null) data['session'] = session; return data; }