refactor(registration): remove username

This commit is contained in:
mso7nueh
2024-07-31 15:44:04 +03:00
parent 9cfd59b36f
commit 2f1d6425dc
7 changed files with 22 additions and 59 deletions

View File

@@ -16,8 +16,6 @@ class CredentialsScreen extends StatefulWidget {
class _CredentialsScreenState extends State<CredentialsScreen> {
final emailController = TextEditingController();
final nameController = TextEditingController();
final passwordController = TextEditingController();
final passwordConfirmationController = TextEditingController();
@@ -26,7 +24,6 @@ class _CredentialsScreenState extends State<CredentialsScreen> {
void initState() {
super.initState();
emailController.text = widget.sheet.email;
nameController.text = widget.sheet.name;
passwordController.text = widget.sheet.password;
passwordConfirmationController.text = widget.sheet.passwordConfirmation;
}
@@ -52,18 +49,6 @@ class _CredentialsScreenState extends State<CredentialsScreen> {
},
),
SizedBox(height: 16),
Text("username".tr),
SizedBox(height: 4),
CustomTextFormField(
controller: nameController,
hintText: 'Введите имя пользователя',
textInputAction: TextInputAction.next,
onChanged: (newValue) {
final registrationCubit = context.read<RegistrationCubit>();
registrationCubit.updateSheet(registrationCubit.state.sheet.copyWith(name: newValue));
},
),
SizedBox(height: 16),
Text("password".tr),
SizedBox(height: 4),
CustomTextFormField(