mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Refactor visibility logic in Energy Clamp Dialog to handle empty functions list more elegantly
This commit is contained in:
@ -100,8 +100,9 @@ class _EnergyClampDialogState extends State<EnergyClampDialog> {
|
||||
children: [
|
||||
const DialogHeader('Energy Clamp Conditions'),
|
||||
Expanded(
|
||||
child: _functions.isEmpty
|
||||
? SizedBox(
|
||||
child: Visibility(
|
||||
visible: _functions.isNotEmpty,
|
||||
replacement: SizedBox(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -116,8 +117,9 @@ class _EnergyClampDialogState extends State<EnergyClampDialog> {
|
||||
)),
|
||||
],
|
||||
),
|
||||
)
|
||||
: _buildMainContent(context, state)),
|
||||
),
|
||||
child: _buildMainContent(context, state),
|
||||
)),
|
||||
_buildDialogFooter(context, state),
|
||||
],
|
||||
),
|
||||
|
Reference in New Issue
Block a user