forked from eatvio/eatvio_app
refactor(registration): remove username
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user