diff --git a/lib/features/labels/presentation/widgets/create_new_label_modal.dart b/lib/features/labels/presentation/widgets/create_new_label_modal.dart index ca983dd95..d4d7f3673 100644 --- a/lib/features/labels/presentation/widgets/create_new_label_modal.dart +++ b/lib/features/labels/presentation/widgets/create_new_label_modal.dart @@ -114,7 +114,11 @@ class _CreateNewLabelModalState extends State { final appLocalizations = AppLocalizations.of(context); final theme = Theme.of(context); - return LayoutBuilder(builder: (_, constraints) { + return ValueListenableBuilder( + valueListenable: _createLabelStateNotifier, + builder: (_, labelState, __) => PopScope( + canPop: labelState != LabelPositiveButtonState.progressing, + child: LayoutBuilder(builder: (_, constraints) { final currentScreenWidth = constraints.maxWidth; final currentScreenHeight = constraints.maxHeight; final isMobile = currentScreenWidth < ResponsiveUtils.minTabletWidth; @@ -256,7 +260,9 @@ class _CreateNewLabelModalState extends State { } return bodyWidget; - }); + }), + ), + ); } Widget _buildTitle(