refactor(diary): Compiled version apk: profile, settings, diarym registration, auth, navigation bar

This commit is contained in:
2024-04-10 17:07:56 +03:00
parent f4ddb7285c
commit bbbc20a15a
11 changed files with 164 additions and 133 deletions

View File

@@ -65,7 +65,7 @@ class AuthScreen extends StatelessWidget {
EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
onPressed: onTapNoAccount(context)),
NextStepButton(
/*NextStepButton(
text: "Тест дневника".toUpperCase(),
margin:
EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
@@ -76,14 +76,14 @@ class AuthScreen extends StatelessWidget {
margin:
EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
onPressed: onTapProfileTest(context)),
onPressed: onTapProfileTest(context)),*/
BlocBuilder<AuthBloc, AuthState>(builder: (context, state) {
return NextStepButton(
text: "authentificate".tr.toUpperCase(),
margin:
EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
onPressed: () => onTapAuth(state, context));
onPressed: onTapAuth(state, context));
}),
])));
}
@@ -102,6 +102,7 @@ class AuthScreen extends StatelessWidget {
headers: {'Content-Type': 'application/json'},
body: json.encode(credentials),
encoding: utf8);
print(response.statusCode);
if (response.statusCode == 200) {
var res = await jsonDecode(response.body);
final box = await Hive.openBox('token');