mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
use textfield controller from constructor
This commit is contained in:
@ -9,8 +9,9 @@ class SpaceNameTextfieldWidget extends StatelessWidget {
|
|||||||
required this.isNameFieldInvalid,
|
required this.isNameFieldInvalid,
|
||||||
required this.onChange,
|
required this.onChange,
|
||||||
required this.screenWidth,
|
required this.screenWidth,
|
||||||
|
required this.nameController,
|
||||||
});
|
});
|
||||||
TextEditingController nameController = TextEditingController();
|
TextEditingController nameController;
|
||||||
final void Function(String value) onChange;
|
final void Function(String value) onChange;
|
||||||
final double screenWidth;
|
final double screenWidth;
|
||||||
bool isNameFieldExist;
|
bool isNameFieldExist;
|
||||||
|
@ -132,6 +132,7 @@ class CreateSpaceDialogState extends State<CreateSpaceDialog> {
|
|||||||
SpaceNameTextfieldWidget(
|
SpaceNameTextfieldWidget(
|
||||||
isNameFieldExist: isNameFieldExist,
|
isNameFieldExist: isNameFieldExist,
|
||||||
isNameFieldInvalid: isNameFieldInvalid,
|
isNameFieldInvalid: isNameFieldInvalid,
|
||||||
|
nameController: nameController,
|
||||||
screenWidth: screenWidth,
|
screenWidth: screenWidth,
|
||||||
onChange: (value) {
|
onChange: (value) {
|
||||||
enteredName = value.trim();
|
enteredName = value.trim();
|
||||||
|
Reference in New Issue
Block a user