Denish Goklani
Denish Goklani

Reputation: 87

How do I add two icons and multiple actions on a FAB in Flutter?

I want to add two icons on FAB Flutter, one icon will be a map(onPressed show map) and other icon will trigger showBottomModel. A kind of icon switch based floatingActionBar, I don't know if that is possible or please tell me a work around. Thanks.

Upvotes: 1

Views: 780

Answers (1)

Ravindra S. Patil
Ravindra S. Patil

Reputation: 14885

You can use flutter_speed_dial package/dependency here or try below code hope its help to you.

   floatingActionButton: Row(
    mainAxisAlignment: MainAxisAlignment.end,
    children: [
      FloatingActionButton(
        onPressed: () => {},
        child: Icon(Icons.person),
      ),
      FloatingActionButton(
        onPressed: () => {},
        child: Icon(Icons.home),
      ),
    ]
  ),

Your result screen -> enter image description here

Upvotes: 1

Related Questions