Welcome to flutter. Can you share the code where you are calling the MyDrawer()
, I cannot see the overflow when I run it in my device.
For the second error: the problem is that the Image.network
in the ExpansionTile.leading
doesn't find the image so it shows a error placeholder and that placeholder overflows, you can add errorBuilder:
leading: Image.network(
icon,
width: 20,
height: 20,
errorBuilder: (context, _, __) {
return const SizedBox();
},
),
some other recommendations:
Your MyDrawer
can be StatelessWidget
instead of StatefullWidget
The use of Material
in your tiles seams to be unnecessary
[...]
is same as .toList()