Imporoved state control for Profile Screen

This commit is contained in:
Anastasiia Reshetnik
2024-01-29 13:07:12 +03:00
parent 243c628fc4
commit 57471264fe
9 changed files with 204 additions and 136 deletions

View File

@@ -76,10 +76,10 @@ class AdditionalInformationScreen extends StatelessWidget {
headers: {'Content-Type': 'application/json'},
body: json.encode(sheet),
);
var res = await jsonDecode(response.body);
final box = await Hive.openBox('token');
final token = json.decode(response.body)['token'];
final token = res['token']['plainTextToken'];
box.put('token', token);
print('token: ${box.get('token')}');
Navigator.pushNamed(
context,
AppRoutes.myProfile,