forked from eatvio/eatvio_app
Imporoved state control for Profile Screen
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -64,11 +64,11 @@ class _FavoriteFoodsScreenState extends State<FavoriteFoodsScreen> {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.center,
|
||||
style: theme.textTheme.headlineSmall)),
|
||||
SizedBox(height: 23.v),
|
||||
SizedBox(height: 13.v),
|
||||
_buildTextFormFieldFav(context),
|
||||
SizedBox(height: 22.v),
|
||||
SizedBox(height: 12.v),
|
||||
_buildTextFormFieldUnfav(context),
|
||||
SizedBox(height: 27.v),
|
||||
SizedBox(height: 17.v),
|
||||
BlocBuilder<FavoriteFoodsBloc, FavoriteFoodsState>(
|
||||
builder: (context, state) {
|
||||
return NextStepButton(
|
||||
|
||||
@@ -83,17 +83,6 @@ class LanguageSelectScreen extends StatelessWidget {
|
||||
});
|
||||
}),
|
||||
Spacer(flex: 63),
|
||||
NextStepButton(
|
||||
text: "тест профиля".toUpperCase(),
|
||||
margin: EdgeInsets.only(
|
||||
left: 16.h, right: 16.h, bottom: 50.v),
|
||||
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
AppRoutes.myProfile,
|
||||
);
|
||||
}),
|
||||
])),
|
||||
bottomNavigationBar:
|
||||
BlocBuilder<LanguageSelectBloc, LanguageSelectState>(
|
||||
|
||||
Reference in New Issue
Block a user