You have two options here you could either use some kind of font file for your icons which might in general be the better way because of various reasons such as app size and image scaling issues or you could use image files such as .png or .svg. You should have that in mind.
Looking at your code snippet it looks like you want to use image files.
In convex-bottom-bar tab items are generic type since version 1.3.1 so both IconData
and Widget
can be used (see 1.3.1).
That means something like the following is possible:
TabItem(
icon: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFFFF5722),
),
child: Icon(Icons.add, color: Colors.white, size: 40),
)),
See this example example for more information.
So just replace the IconData
with your Image widget and it should work.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…