white back button icon code example

Example 1: button background color remove

.button {     
    background-color: Transparent;
    background-repeat:no-repeat;
    border: none;      
}

Example 2: raisedbutton background color

List _list = [true, false, true, false];

@override
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(title: Text("Title")),
    body: ListView(children: _buildButtons()),
  );
}

List _buildButtons() {
  List listButtons = List.generate(_list.length, (i) {
    return RaisedButton(
      color: _list[i] ? Colors.green : Colors.red,
      onPressed: () {
        setState(() {
          _list[i] = !_list[i];
        });
      },
      child: Text("Button #${i}"),
    );
  });
  return listButtons;
}

Tags:

Misc Example