New token format

This commit is contained in:
2024-02-01 15:55:23 +03:00
parent 80887d105c
commit fb2a169276

View File

@@ -91,7 +91,7 @@ class AuthScreen extends StatelessWidget {
if (response.statusCode == 200) {
var res = await jsonDecode(response.body);
final box = await Hive.openBox('token');
final token = res['token']['plainTextToken'];
final token = res['token'];
box.put('token', token);
Navigator.pushNamed(
context,
@@ -171,4 +171,4 @@ class AuthScreen extends StatelessWidget {
return errors;
}
}
}