diff --git a/lib/presentation/auth/auth_screen/auth_screen.dart b/lib/presentation/auth/auth_screen/auth_screen.dart index bdd2d785..e934925b 100644 --- a/lib/presentation/auth/auth_screen/auth_screen.dart +++ b/lib/presentation/auth/auth_screen/auth_screen.dart @@ -27,11 +27,12 @@ class AuthScreen extends StatelessWidget { @override Widget build(BuildContext context) { mediaQueryData = MediaQuery.of(context); - return BlocBuilder(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( + 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( + 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(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) { diff --git a/lib/widgets/custom_bottom_bar.dart b/lib/widgets/custom_bottom_bar.dart index 3dd396dd..283982b8 100644 --- a/lib/widgets/custom_bottom_bar.dart +++ b/lib/widgets/custom_bottom_bar.dart @@ -56,6 +56,7 @@ class CustomBottomBarState extends State { @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 { 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 { 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, // Не смещаем по вертикали diff --git a/lib/widgets/custom_text_form_field.dart b/lib/widgets/custom_text_form_field.dart index 7b76f706..86a2a237 100644 --- a/lib/widgets/custom_text_form_field.dart +++ b/lib/widgets/custom_text_form_field.dart @@ -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,