Whole Icon button becomes grey : flutter
170
How about this one.
From this your code,
Padding(
padding: EdgeInsets.only(right: 10),
child: IconButton(
icon: Icon(Icons.play_circle_fill_outlined, size: 45),
onPressed: () {},
color: light_mode ? Color(0xFFEA80FC) : Color(0xFF6D6D6D),
),
),
to this one.
SizedBox(
width: 36,
height: 36,
child: FloatingActionButton(
onPressed: () {},
backgroundColor:
light_mode ? Color(0xFFEA80FC) : Color(0xFF6D6D6D),
child: Icon(Icons.play_arrow),
),
),
Author by
Noor
Updated on December 30, 2022Comments
-
Noor over 1 year
I'm trying to apply a color on play_icon in bottom navigation bar. The problem is the whole icon becomes grey. What I want to achieve is this:
What I am currently having is this:
This is the code:
Material( color: light_mode ? Color(0xFFFFFFFF) : Color(0xFF616161), child: Container( alignment: Alignment.center, height: 60, width: MediaQuery.of(context).size.width, child: Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Padding( padding: EdgeInsets.all(1.0), child: IconButton( icon: Icon(Icons.skip_previous), onPressed: () {}, color: Colors.grey)), Padding( padding: EdgeInsets.only(right: 10), child: IconButton( icon: Icon( Icons.play_circle_fill_outlined, size: 45), onPressed: () {}, color: light_mode ? Color(0xFFEA80FC) : Color(0xFF6D6D6D))), Padding( padding: EdgeInsets.all(1.0), child: IconButton( icon: Icon(Icons.skip_next), onPressed: () {}, color: Colors.grey)), Padding( padding: EdgeInsets.all(1.0), child: IconButton( icon: Icon( Icons.bookmark_border_outlined), onPressed: () {}, color: Colors.grey)), Padding( padding: EdgeInsets.all(1.0), child: IconButton( icon: Icon(Icons.share_rounded), onPressed: () {}, color: Colors.grey)), ], )))