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

The menu not hide when I use the return gesture on Android. #487

Open
BeADre opened this issue Jan 7, 2025 · 0 comments
Open

The menu not hide when I use the return gesture on Android. #487

BeADre opened this issue Jan 7, 2025 · 0 comments

Comments

@BeADre
Copy link

BeADre commented Jan 7, 2025

flutter version: 3.24.4
super_context_menu version: 0.8.24

Code sample
import 'package:flutter/material.dart';
import 'package:super_context_menu/super_context_menu.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Builder(builder: (context) {
        return Scaffold(
          appBar: AppBar(
            title: const Text('Page A'),
          ),
          backgroundColor: Colors.blueAccent,
          body: Center(
            child: MaterialButton(
                onPressed: () {
                  Navigator.of(context).push(
                    MaterialPageRoute(
                      builder: (context) => Scaffold(
                        appBar: AppBar(
                          title: const Text('Page B'),
                        ),
                        backgroundColor: Colors.amberAccent,
                        body: Center(
                          child: ContextMenuWidget(
                            child: Container(child: Text('Base Context Menu')),
                            menuProvider: (_) {
                              return Menu(
                                children: [
                                  MenuAction(
                                      title: 'Menu Item 1', callback: () {}),
                                  MenuAction(
                                      title: 'Menu Item 2', callback: () {}),
                                  MenuAction(
                                      title: 'Menu Item 3', callback: () {}),
                                ],
                              );
                            },
                          ),
                        ),
                      ),
                    ),
                  );
                },
                child: const Text('Next')),
          ),
        );
      }),
    );
  }
}
Video
2025-01-07-17-16-06.mp4
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

1 participant