Building A Step Progress Indicator View In Flutter

In this post, we will learn how to make a dynamic step progress indicator view in a Flutter application.


In any app, usually we will have to build some kind of Form to collect input from users. Traditionally apps used to have long and boring Forms. Imagine you are suddenly presented with this kind of form when you open any app.

A Boring Long Form
A Boring Long Form

Yes, look for the nearest exit!

However, in today’s modern apps, we often find a multi-step fashioned forms. These kind of forms are progressive and visually appealing to the users.

Step Progress Indicator
Step Progress Indicator

The element that makes the Form progressive is the Step Progress Indicator that always stays on the top of the page.

Code Setup: Step Progress Indicator

First of all, let’s identify the variables that might play a part to display this step progress indicator view.

The variable _stepsText can enable us to have a dynamic list of steps: 3, 4 or 10 step form.

You can initialize all variables via the constructor like so:

Now, to build the dots and progress line, we can use the function below:

Similarly, to build the texts underneath each step, we can use this function:

Once you have these identified, all you gotta do is just build the view 🙂

Demo With A PageView Widget

Now that our step progress indicator view is ready, let’s use this in a demo app. We can make use of the PageView widget to build the multiple pages of our Form.

Become A Flutter Expert With This Course

Initializing Our StepProgressView

Related Posts:

Flutter: Adding A Progress Bar Animation In Page View

About the author