Reputation: 87
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
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