-3

I want to build a menu bar in Flutter for my web app. I want to show my popupmenuitems as a popup when I hover the button. Is this possible?

PopupMenuButton(
  tooltip: '',
  color: const Color(0xFF262533),
  position: PopupMenuPosition.under,
  child: const Text(
    'Agenturen & Clubs',
    style: TextStyle(
      color: Colors.white,
      fontSize: 24,
      fontFamily: 'Poppins',
    ),
  ),
  itemBuilder: (BuildContext context) =>
      <PopupMenuEntry>[
        const PopupMenuItem(
          child: ListTile(
            title: Text(
              'Escortagenturen',
              style: TextStyle(color: Colors.white),
            ),
          ),
        ),
        const PopupMenuItem(
          child: ListTile(
            title: Text(
              'Bordelle',
              style: TextStyle(color: Colors.white),
            ),
          ),
        ),
        const PopupMenuItem(
          child: ListTile(
            title: Text(
              'Laufhauser',
              style: TextStyle(color: Colors.white),
            ),
          ),
        ),
        const PopupMenuItem(
          child: ListTile(
            title: Text(
              'Saunaclubs',
              style: TextStyle(color: Colors.white),
            ),
          ),
        ),
        const PopupMenuItem(
          child: ListTile(
            title: Text(
              'Domina & BDSM-Studios',
              style: TextStyle(color: Colors.white),
            ),
          ),
        ),
        const PopupMenuItem(
          child: ListTile(
            title: Text(
              'Tantra & Massaage-Studios',
              style: TextStyle(color: Colors.white),
            ),
          ),
        ),
      ]),
Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109

1 Answers1

0
  InkWell(
                      onHover: (value) {
                        // show your popup
                      },
                      child: Text(
                        'Agenturen & Clubs',
                        style: TextStyle(
                          color: Colors.white,
                          fontSize: 24,
                          fontFamily: 'Poppins',
                        ),
                      ),
                    ),
Anand
  • 4,355
  • 2
  • 35
  • 45