flutterstepperuistepperflutter-appbar

Flutter stepper inside appbar


Can I use an horizontal stepper widget inside the appbar? If not, how can I "override" the appbar and customize it to do what I want to do? (I just need 3 steps) Thanks!


Solution

  • Just use the attribute bottom of the AppBar. The stepper needs to be wrapped by a PreferredSize Widget.

    AppBar(
      bottom: PreferredSize(
        preferredSize: const Size.fromHeight(110.0),
        child: Stepper(),
      ),
      actions: [],
    )
    

    It works for me.