diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart index c36e9ad05..01eafc874 100644 --- a/lib/pages/chat/chat_input_row.dart +++ b/lib/pages/chat/chat_input_row.dart @@ -118,6 +118,7 @@ class ChatInputRow extends StatelessWidget { decoration: const BoxDecoration(), clipBehavior: Clip.hardEdge, child: PopupMenuButton( + useRootNavigator: true, icon: const Icon(Icons.add_circle_outline), iconColor: theme.colorScheme.onPrimaryContainer, onSelected: controller.onAddPopupMenuButtonSelected, @@ -198,6 +199,7 @@ class ChatInputRow extends StatelessWidget { decoration: const BoxDecoration(), clipBehavior: Clip.hardEdge, child: PopupMenuButton( + useRootNavigator: true, icon: const Icon(Icons.camera_alt_outlined), onSelected: controller.onAddPopupMenuButtonSelected, iconColor: theme.colorScheme.onPrimaryContainer, @@ -377,6 +379,7 @@ class _ChatAccountPicker extends StatelessWidget { child: FutureBuilder( future: controller.sendingClient.fetchOwnProfile(), builder: (context, snapshot) => PopupMenuButton( + useRootNavigator: true, onSelected: (mxid) => _popupMenuButtonSelected(mxid, context), itemBuilder: (BuildContext context) => clients .map( diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index ae70610d2..1436cb00b 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -68,6 +68,7 @@ class ChatView extends StatelessWidget { ), if (controller.selectedEvents.length == 1) PopupMenuButton<_EventContextAction>( + useRootNavigator: true, onSelected: (action) { switch (action) { case _EventContextAction.info: diff --git a/lib/pages/chat_list/client_chooser_button.dart b/lib/pages/chat_list/client_chooser_button.dart index a9b13e731..6e566366a 100644 --- a/lib/pages/chat_list/client_chooser_button.dart +++ b/lib/pages/chat_list/client_chooser_button.dart @@ -162,6 +162,7 @@ class ClientChooserButton extends StatelessWidget { borderRadius: BorderRadius.circular(99), color: Colors.transparent, child: PopupMenuButton( + useRootNavigator: true, popUpAnimationStyle: FluffyThemes.isColumnMode(context) ? AnimationStyle.noAnimation : null, // https://github.com/flutter/flutter/issues/167180 diff --git a/lib/pages/chat_list/space_view.dart b/lib/pages/chat_list/space_view.dart index 9a10095c0..9ad564215 100644 --- a/lib/pages/chat_list/space_view.dart +++ b/lib/pages/chat_list/space_view.dart @@ -579,9 +579,6 @@ class _SpaceViewState extends State { widget.toParentSpace(joinedParents.first.id), ) : PopupMenuButton( - popUpAnimationStyle: AnimationStyle( - duration: const Duration(milliseconds: 0), - ), tooltip: null, useRootNavigator: true, icon: const Icon(Icons.arrow_back_outlined), @@ -635,6 +632,7 @@ class _SpaceViewState extends State { ), actions: [ PopupMenuButton( + useRootNavigator: true, onSelected: _onSpaceAction, itemBuilder: (context) => [ PopupMenuItem( diff --git a/lib/pages/homeserver_picker/homeserver_picker_view.dart b/lib/pages/homeserver_picker/homeserver_picker_view.dart index d637c0991..c1878b8a4 100644 --- a/lib/pages/homeserver_picker/homeserver_picker_view.dart +++ b/lib/pages/homeserver_picker/homeserver_picker_view.dart @@ -35,6 +35,7 @@ class HomeserverPickerView extends StatelessWidget { ), actions: [ PopupMenuButton( + useRootNavigator: true, onSelected: controller.onMoreAction, itemBuilder: (_) => [ PopupMenuItem( diff --git a/lib/pages/settings_emotes/settings_emotes_view.dart b/lib/pages/settings_emotes/settings_emotes_view.dart index ccd3b9e55..3134cba8d 100644 --- a/lib/pages/settings_emotes/settings_emotes_view.dart +++ b/lib/pages/settings_emotes/settings_emotes_view.dart @@ -29,6 +29,7 @@ class EmotesSettingsView extends StatelessWidget { title: Text(L10n.of(context).customEmojisAndStickers), actions: [ PopupMenuButton( + useRootNavigator: true, onSelected: (value) { switch (value) { case PopupMenuEmojiActions.export: diff --git a/lib/widgets/chat_settings_popup_menu.dart b/lib/widgets/chat_settings_popup_menu.dart index 7aff3fb46..e99a61a86 100644 --- a/lib/widgets/chat_settings_popup_menu.dart +++ b/lib/widgets/chat_settings_popup_menu.dart @@ -52,6 +52,7 @@ class ChatSettingsPopupMenuState extends State { children: [ const SizedBox.shrink(), PopupMenuButton( + useRootNavigator: true, onSelected: (choice) async { switch (choice) { case ChatPopupMenuActions.leave: diff --git a/lib/widgets/log_view.dart b/lib/widgets/log_view.dart index caeaeee44..0779af6e6 100644 --- a/lib/widgets/log_view.dart +++ b/lib/widgets/log_view.dart @@ -36,6 +36,7 @@ class LogViewerState extends State { onPressed: () => setState(() => fontSize--), ), PopupMenuButton( + useRootNavigator: true, itemBuilder: (context) => Level.values .map( (level) => PopupMenuItem(