
How to set the background of FloatingActionButton transparent which is blocking the ListView ?
Here is my code :
FloatingActionButton(
    isExtended: false,
    backgroundColor: Colors.blue,
    foregroundColor: Colors.white,
    child: new Icon(Icons.add),
    onPressed: () {}
)
Here is the structure of body of Scaffold :
body : new Column (
           children : <Widget>[
               new Expanded (
                   child : new ListView.builder() //ListView.builder
               ), //Expanded
               new FloatingActionButton () //FloatingActionButton
           ] //<Widget>[]
        ) //Column
I also tried wrapping it with a Container and then applying container's background transparent, but it didn't work.
And also how to align it to the bottom|end of parent (body of Scaffold) ?
You should set it in the floatingActionButton: Scaffold property, as in the example project created by flutter create command.
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text(widget.title),
      ),
      body: new Center(),
      floatingActionButton: new FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: new Icon(Icons.add),
      ),
    );
  }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With