The icon on FloatingActionButton extended is on left, how can i put the icon on right? after the text

floatingActionButton: FloatingActionButton.extended(   
            onPressed: (){},
            label: Text("Next",),
            icon: Icon(Icons.arrow_forward,
            ),
      ),
      floatingActionButtonLocation: FloatingActionButtonLocation.endFloat 

1 Answers

1
Hosar On Best Solutions

I don't think you can do that with FloatingActionButton, but instead you can configure a RaisedButton to look very similar.
Just use it same as you would do it with FloatingActionButton.

floatingActionButton: RaisedButton(
        child:  Container(
          height: 50.0,
          child: Row(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
            const SizedBox(width: 16.0),
                   Text('Next', style: TextStyle(color: Colors.white, fontSize: 25),),
                   const SizedBox(width: 8.0),
                   Icon(Icons.arrow_forward, size: 30.0, color: Colors.white,),
                   const SizedBox(width: 20.0),
          ]),
        ),
        color: Colors.blue,
        shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(30.0),
                  ),
        onPressed: () {
          print('Do somenthing');
        },

      )

Hope this help.