mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Refactor routine creation UI for improved code organization
This commit is contained in:
@ -62,28 +62,34 @@ class _CreateNewRoutinesDialogState extends State<CreateNewRoutinesDialog> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Divider(),
|
||||
CommunityDropdown(
|
||||
selectedValue: _selectedCommunity,
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
_selectedCommunity = newValue;
|
||||
_selectedSpace = null;
|
||||
});
|
||||
if (newValue != null) {
|
||||
_fetchSpaces(newValue);
|
||||
}
|
||||
},
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 15, right: 15),
|
||||
child: CommunityDropdown(
|
||||
selectedValue: _selectedCommunity,
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
_selectedCommunity = newValue;
|
||||
_selectedSpace = null;
|
||||
});
|
||||
if (newValue != null) {
|
||||
_fetchSpaces(newValue);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SpaceDropdown(
|
||||
hintMessage: spaceHint,
|
||||
spaces: spaces,
|
||||
selectedValue: _selectedSpace,
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
_selectedSpace = newValue;
|
||||
});
|
||||
},
|
||||
const SizedBox(height: 5),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 15, right: 15),
|
||||
child: SpaceDropdown(
|
||||
hintMessage: spaceHint,
|
||||
spaces: spaces,
|
||||
selectedValue: _selectedSpace,
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
_selectedSpace = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
Row(
|
||||
@ -96,7 +102,6 @@ class _CreateNewRoutinesDialogState extends State<CreateNewRoutinesDialog> {
|
||||
),
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
@ -139,6 +144,7 @@ class _CreateNewRoutinesDialogState extends State<CreateNewRoutinesDialog> {
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user