fix(user): Replace cubit context read with state variable on login page
parent
465af52350
commit
f4e588c435
|
@ -418,6 +418,14 @@ class InitializingPage extends StatelessWidget {
|
||||||
'initializing.enter_nickname_and_password'.tr(),
|
'initializing.enter_nickname_and_password'.tr(),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
if (formCubitState.isErrorShown)
|
||||||
|
Text(
|
||||||
|
'users.username_rule'.tr(),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.error,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
CubitFormTextField(
|
CubitFormTextField(
|
||||||
formFieldCubit: context.read<RootUserFormCubit>().userName,
|
formFieldCubit: context.read<RootUserFormCubit>().userName,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
|
|
@ -55,7 +55,7 @@ class NewUser extends StatelessWidget {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
if (context.read<UserFormCubit>().state.isErrorShown)
|
if (formCubitState.isErrorShown)
|
||||||
Text(
|
Text(
|
||||||
'users.username_rule'.tr(),
|
'users.username_rule'.tr(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
Loading…
Reference in New Issue