Julien leburn
Julien leburn

Reputation: 87

Flutter PopupMenuButton customizing the 3 dots in menu

i have app bar in menu using flutter, the thing is I don't where is the 3 dots icon i want give it specific colour, thanks all for your help

PopupMenuButton(itemBuilder: (ct) {
          return [
            PopupMenuItem(
              value: 'value1',
              child: InkWell(
                onTap: () => showDialog(
                    barrierDismissible: true,
                    context: context,
                    builder: (context) => ReportUser(
                          currentUser: widget.sender,
                          seconduser: widget.second,
                        )).then((value) => Navigator.pop(ct)),
                child: Container(
                    width: 100,
                    height: 30,
                    child: Text(
                      "Report",
                    )),
              ),
            ),
       

Upvotes: 1

Views: 5699

Answers (1)

Priyesh
Priyesh

Reputation: 1313

I've used this code, use icon param

PopupMenuButton(
          icon: Icon(Icons.more_vert,color: Colors.white), // add this line
          itemBuilder: (_) => <PopupMenuItem<String>>[
            new PopupMenuItem<String>(
                child: Container(
                    width: 100,
                    // height: 30,
                    child: Text(
                      "Report",
                      style: TextStyle(color: Colors.red),
                    )), value: 'report'),

          ],
          onSelected: (index) async {
            switch (index) {
              case 'report':
              // showDialog(
              //     barrierDismissible: true,
              //     context: context,
              //     builder: (context) => ReportUser(
              //       currentUser: widget.sender,
              //       seconduser: widget.second,
              //     )).then((value) => Navigator.pop(ct))
                break;
            }
          })

Hope this will work for you.

Upvotes: 7

Related Questions