阅读背景:

flutter PopupMenuButton添加背景颜色

来源:互联网 

参考
参考代码

Center( child: Theme( data: Theme.of(context).copyWith( cardColor: Colors.greenAccent, ), child: PopupMenuButton<int>( onSelected: (value) { }, offset: Offset(50, 50), itemBuilder: (context) => [ PopupMenuItem( value: 1, child: Container( height: double.infinity, width: double.infinity, color: Colors.greenAccent, // i use this to change the bgColor color right now child: Row( mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[ Icon(Icons.check), SizedBox(width: 10.0), Text("Konfirmasi Update"), SizedBox(width: 10.0), ], ), ), ) ] ) ) ) Center( child: Theme( data: Theme.of(conte



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: