Search code examples
flutterdartdialogflutter-layoutflutter-animation

Flutter toast dialog


How can I can make such toast dialog in flutter? (create service, create venue)

Interactive example: https://files.fm/f/dw6qvmznc

enter image description here


Solution

  • You can use PopupMenuButton

    PopupMenuButton<String>(
      icon: const Icon(Icons.add_circle_outline_outlined),
      color: Colors.grey, // background color
      itemBuilder: (BuildContext context) => <PopupMenuEntry<String>>[
        PopupMenuItem<String>(
          value: "create service",
          onTap: () {},
          child: const Center(
            child: Text(
              'create service',
            ),
          ),
        ),
        PopupMenuItem<String>(
          value: "create venue",
          child: const Center(
            child: Text(
              'create venue',
            ),
          ),
          onTap: () {},
        ),
      ],
    )