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

View File

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

View File

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