Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested beamer route stops keyboard to open in landscape view #625

Open
F7085 opened this issue Jul 6, 2023 · 3 comments
Open

Nested beamer route stops keyboard to open in landscape view #625

F7085 opened this issue Jul 6, 2023 · 3 comments

Comments

@F7085
Copy link

F7085 commented Jul 6, 2023

The issue is present in a tablet device in landscape mode. in my home screen I'm using a nested route to show different screens, at the moment that i tried to open the keyboard for some reason the nested route is stopping it to open.

This is the body of my home screen

 body: Beamer(
        key: beamerKey,
        routerDelegate: BeamerDelegate(
            transitionDelegate: const NoAnimationTransitionDelegate(),
            locationBuilder: (routeInformation, _) {
              if (routeInformation.location!.contains('tickets')) {
                return TicketsLocation(routeInformation);
              } else if (routeInformation.location!.contains('movements')) {
                return MovementsLocation(routeInformation);
              } else if (routeInformation.location!.contains('orders')) {
                return OrdersLocation(routeInformation);
              }
              return ManagementLocation(routeInformation);
            }),
      ),

this is the way that i show the dialog that I'm currently working, is located in the app bar of my home screen

PopupMenuItem<String>(
                  onTap: () {
                    Future.delayed(const Duration(seconds: 0), () {
                      showAnimatedDialog(
                        context: context,
                        builder: (dialogContext) => BlocProvider(
                          create: (dialogContext) => WebUpdateStoresCubit(
                              context.read<StoresApiService>()),
                          child: AddStoresModal(context: dialogContext),
                        ),
                        animationType: DialogTransitionType.scale,
                        curve: Curves.ease,
                        duration: const Duration(milliseconds: 500),
                      );
                    });
                  },
                  value: 'stores',
                  child: const Row(
                    children: [
                      Icon(Icons.store, color: Colors.black),
                      SizedBox(width: 8),
                      Text('Stores'),
                    ],
                  ),
                ),

I tried removing all the widgets that i have in my screen and the issue is still present but at the moment to remove the nested route the keyboard opens normally, I also tried with another dialog that works fine in another screen that dosent have a nested route , i put it in the first screen of the nested route and in the home appBar and it didn't work

2023-07-05.23-19-28.mp4
@emmanuellmota
Copy link

I have same issue. Anyone managed to solve this?
Thanks

@F7085
Copy link
Author

F7085 commented Jul 26, 2023

I have same issue. Anyone managed to solve this? Thanks
did you find a way to solve it? o you try another approach

@talski
Copy link

talski commented Jan 11, 2024

I've got it working wrapping the nested Beamer widget with a FocusScope.

FocusScope(
  child: Beamer(
    routerDelegate: beamerDelegate,
  ),
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants