How to add Multiple Floating button in Stack Widget in Flutter

后端 未结 7 1311
终归单人心
终归单人心 2021-02-04 03:09

In flutter one view over another view using Stack Widget. It\'s work fine. Now I need to added two floating button left and right side of bottom of screen. I added one button ri

7条回答
  •  面向向阳花
    2021-02-04 03:45

    just add row as floatingActionButton in Scafold and set position centerFloat

    as EX

    Scaffold(
          floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
          //store btn
          floatingActionButton: Container(
            child: Row(
              children: [
                //add left Widget here with padding left
                Spacer(
                  flex: 1,
                ),
                //add right Widget here with padding right
              ],
            ),
          ),
        );
    

提交回复
热议问题