1. Question background
I want to change the background color of button, keeping the original color of icon. In my program, my button color is blue. Since I wanted to remove the blue color, I tried several ways. But everything didn't work.
2. What I already tried
theme : ThemeData
theme: ThemeData( colorScheme: const ColorScheme.light( primary : Colors.lime, ), ),
backgroundColor : Theme.of()
backgroundColor: Theme.of(context).primaryColor,
(etc using theme color modification)
3. My code and Result
body : Center(
child: Container(
height: 500,
color: Colors.lime[200],
child: ListView.builder(
itemCount :name.length,
itemBuilder: (c,i){
return Align(
alignment: Alignment.bottomRight,
child: ListTile(
leading: const Icon(Icons.shopping_bag),
title : Text(name[i]),
),
);
},
),
),
),
floatingActionButton: FloatingActionButton(
theme: ThemeData(
colorScheme: const ColorScheme.light(
primary : Colors.lime,
),
),
onPressed: (){
showDialog(context: context, builder: (context) {
//designate the developer made function into specific name
return DialogUI(usingaddOne:addOne, usingaddString : addString);
});
},
child : const Icon(Icons.shopping_cart, ,),
),
);}
}
4. Question
I want to change the button with lime (or red) background color with the original color of icon. Or just remove the blue color. Is there any other way that i've not tried?
