mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-24 23:52:27 +00:00
Made SpaceSubSpacesDialog
scrollable, for a better UX, and to account for a very long list of subspaces.
This commit is contained in:
@ -89,28 +89,35 @@ class _SpaceSubSpacesDialogState extends State<SpaceSubSpacesDialog> {
|
|||||||
),
|
),
|
||||||
child: const SelectableText('Create Sub-Space'),
|
child: const SelectableText('Create Sub-Space'),
|
||||||
),
|
),
|
||||||
content: Column(
|
content: ConstrainedBox(
|
||||||
spacing: 12,
|
constraints: BoxConstraints(
|
||||||
mainAxisSize: MainAxisSize.min,
|
maxHeight: context.screenHeight * 0.4,
|
||||||
children: [
|
),
|
||||||
SubSpacesInput(
|
child: SingleChildScrollView(
|
||||||
subSpaces: _subspaces,
|
child: Column(
|
||||||
onSubspaceAdded: _handleSubspaceAdded,
|
spacing: 12,
|
||||||
onSubspaceDeleted: _handleSubspaceDeleted,
|
mainAxisSize: MainAxisSize.min,
|
||||||
controller: _subspaceNameController,
|
children: [
|
||||||
),
|
SubSpacesInput(
|
||||||
AnimatedSwitcher(
|
subSpaces: _subspaces,
|
||||||
duration: const Duration(milliseconds: 100),
|
onSubspaceAdded: _handleSubspaceAdded,
|
||||||
child: Visibility(
|
onSubspaceDeleted: _handleSubspaceDeleted,
|
||||||
key: ValueKey(_hasDuplicateNames),
|
controller: _subspaceNameController,
|
||||||
visible: _hasDuplicateNames,
|
|
||||||
child: const SelectableText(
|
|
||||||
'Error: Duplicate subspace names are not allowed.',
|
|
||||||
style: TextStyle(color: Colors.red),
|
|
||||||
),
|
),
|
||||||
),
|
AnimatedSwitcher(
|
||||||
|
duration: const Duration(milliseconds: 100),
|
||||||
|
child: Visibility(
|
||||||
|
key: ValueKey(_hasDuplicateNames),
|
||||||
|
visible: _hasDuplicateNames,
|
||||||
|
child: const SelectableText(
|
||||||
|
'Error: Duplicate subspace names are not allowed.',
|
||||||
|
style: TextStyle(color: Colors.red),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
SpaceDetailsActionButtons(
|
SpaceDetailsActionButtons(
|
||||||
|
Reference in New Issue
Block a user