在 项目管理系统 “我的”功能中,先使用column 再使用container分隔各个菜单,为了方便操作,这样就需要加container上加上事件, container组件本身不带事件。就需要使用Listener
Listener(
child: Container(
height: 50,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: const [
CircleAvatar(
child: Icon(Icons.article),
),
SizedBox(
width: 5,
),
Text("协议"),
],
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: StyleConstant.bg),
),
),
),
onPointerDown: (PointerDownEvent event){
Navigator.pushNamed(context, '/protocol');
},
),