Merge pull request 'revert 6b997a69fe7f69d53c776736f1a45c088571087e' (#78) from maxxkim-patch-2 into main

Reviewed-on: eatvio/eatvio_app#78
Reviewed-by: mike <reshetnick.mike@gmail.com>
This commit is contained in:
2024-06-05 11:06:18 +00:00
3 changed files with 45 additions and 21 deletions

View File

@@ -27,11 +27,12 @@ class AuthScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
mediaQueryData = MediaQuery.of(context);
return BlocBuilder<AuthBloc, AuthState>(builder: (context, state) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: _buildAppBar(context),
body: Container(
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: _buildAppBar(context),
body:GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: Container(
width: double.maxFinite,
padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 9.v),
child: Column(children: [
@@ -41,16 +42,24 @@ class AuthScreen extends StatelessWidget {
SizedBox(height: 60.v),
Text("email".tr, style: theme.textTheme.bodyLarge),
SizedBox(height: 3.v),
CustomTextFormField(
controller: state.emailController,
textInputAction: TextInputAction.done),
BlocSelector<AuthBloc, AuthState, TextEditingController?>(
selector: (state) => state.emailController,
builder: (context, emailController) {
return CustomTextFormField(
controller: emailController,
textInputAction: TextInputAction.done);
}),
SizedBox(height: 22.v),
Text("password".tr, style: theme.textTheme.bodyLarge),
SizedBox(height: 5.v),
CustomTextFormField(
obscureText: true,
controller: state.passwordController,
),
BlocSelector<AuthBloc, AuthState, TextEditingController?>(
selector: (state) => state.passwordController,
builder: (context, passwordController) {
return CustomTextFormField(
obscureText: true,
controller: passwordController,
);
}),
SizedBox(height: 50.v),
NextStepButton(
text: "no_account".tr.toUpperCase(),
@@ -58,15 +67,27 @@ class AuthScreen extends StatelessWidget {
EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
onPressed: onTapNoAccount(context)),
NextStepButton(
text: "authentificate".tr.toUpperCase(),
/*NextStepButton(
text: "Тест дневника".toUpperCase(),
margin:
EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
onPressed: onTapAuth(state, context)),
]),
));
});
onPressed: onTapDiaryTest(context)),
NextStepButton(
text: "Тест чата".toUpperCase(),
margin:
EdgeInsets.only(left: 16.h, right: 16.h, bottom: 50.v),
buttonStyle: CustomButtonStyles.outlinePrimaryTL15,
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));
}),
]))));
}
onTapAuth(AuthState state, BuildContext context) {

View File

@@ -56,6 +56,7 @@ class CustomBottomBarState extends State<CustomBottomBar> {
@override
Widget build(BuildContext context) {
return Container(
height: 100.v,
decoration: BoxDecoration(
border: Border.all(
color: appTheme.whiteA700,
@@ -104,6 +105,7 @@ class CustomBottomBarState extends State<CustomBottomBar> {
double iconWidth;
if (index == 0) {
iconHeight = 50.v;
iconWidth = 50.h;
} else if (index == bottomMenuList.length - 2) {
@@ -137,7 +139,8 @@ class CustomBottomBarState extends State<CustomBottomBar> {
shadowColor: Colors.white,
surfaceTintColor: Colors.white,
position: RelativeRect.fromLTRB(
MediaQuery.of(context).size.width - 50,
MediaQuery.of(context).size.width -
50,
kToolbarHeight + 340,
0, // Не смещаем по горизонтали
0, // Не смещаем по вертикали

View File

@@ -123,8 +123,8 @@ class CustomTextFormField extends StatelessWidget {
width: width ?? double.maxFinite,
child: TextFormField(
controller: controller,
focusNode: focusNode ?? null,
autofocus: autofocus ?? false,
focusNode: focusNode ?? FocusNode(),
autofocus: autofocus!,
style: textStyle ?? theme.textTheme.titleMedium,
obscureText: obscureText!,
textInputAction: textInputAction,