Status Stepper: Use this package for showing status changing

Overview

status_stepper

Use this package for showing status changing. For now available only left to right animation.

Quick reference

Property What does it do
animationDuration The duration of animation for 1 stepper item, multiplyes by 2(for animating connector and item) * n(n - count of children to animate)
animationDelayDuration Duration before starting animation
currentIndex Current status index, -1 if there are no active items
lastActiveIndex Animation starts after widget at this position
activeColor Color of active and passed statuses, by default is Theme.of(context).primaryColor
disabledColor Color of next statuses, by default is Theme.of(context).colorScheme.secondaryVariant
connectorCurve Curve for the connectors
itemCurve Curve for the status widgets
connectorThickness Thickness of the connector

Example

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Status Stepper Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Status Stepper Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final statuses = List.generate(
    4,
    (index) => SizedBox.square(
      dimension: 32,
      child: Center(child: Text('$index')),
    ),
  );

  int curIndex = -1;
  int lastIndex = -1;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Padding(
              padding: const EdgeInsets.all(8.0),
              child: StatusStepper(
                connectorCurve: Curves.easeIn,
                itemCurve: Curves.easeOut,
                activeColor: Colors.amber,
                disabledColor: Colors.grey,
                animationDuration: const Duration(milliseconds: 500),
                children: statuses,
                lastActiveIndex: lastIndex,
                currentIndex: curIndex,
                connectorThickness: 6,
              ),
            ),
            ElevatedButton(
              onPressed: () {
                setState(() {
                  curIndex = -1;
                  lastIndex = -1;
                });
              },
              child: const Text(
                'Reset',
              ),
            ),
            Expanded(
              child: ListView.builder(
                itemCount: statuses.length,
                itemBuilder: (context, index) => ElevatedButton(
                  onPressed: index > curIndex
                      ? () {
                          setState(() {
                            lastIndex = curIndex;
                            curIndex = index;
                          });
                        }
                      : null,
                  child: Text(
                    '$index',
                  ),
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}
You might also like...

Flutter Project showing random image with GETX

Flutter Project showing random image with GETX

RdmImageWithGETX Présentation RdmImageWithGETX est un projet développé en Flutter durant le module "Développement Mobile" à l'école Ynov Lyon Campus.

Mar 8, 2022

This Crypto App is Simply Showing data and chart by using coin gecko api.

This Crypto App is Simply Showing data and chart by using coin gecko api.

crypto_app This is Simple Crypto Currency analytics showing app using coingecko api. You Can Use this if you want to show simply crypto currency analy

Oct 7, 2022

An application that helps you to quit smoking by showing your everyday performance and boosting your confidence.

An application that helps you to quit smoking by showing your everyday performance and boosting your confidence.

This Project is developed in HACKTOBERFEST 2022 By I Can And I Will An application that helps you to quit smoking by showing your everyday performance

Oct 27, 2022

Cloud storage status

Cloud storage status

cloud_storage_status Get me a coffee: Bitcoin Address: 1DiFn7B9APaQJKfYAKqesnGM2eVM1MW6U Ethereum Address: 0xAdc43dadbE2b64DC9ba1c8766764F7cD4a2Fa915

Jul 23, 2021

A Flutter widget that checks and displays the version status of application and you can easily guide user to update your app

A Flutter widget that checks and displays the version status of application and you can easily guide user to update your app

A most easily usable Flutter widget about application version check! 1. About 1.

Dec 16, 2021

Coolet - A simple app that will give you suggestion on what to wear/do using the latest weather status at your current location

Coolet - A simple app that will give you suggestion on what to wear/do using the latest weather status at your current location

coolet A simple app that gives you a suggestion on what to wear (sometimes do) b

Jan 20, 2022

Status Alert for Flutter

 Status Alert for Flutter

Status Alert for Flutter

Jan 8, 2023

Connection Notifier - A simple way to notify your user about the connection status.

Connection Notifier A simple way to notify your user about the connection status. Basic Usage: ConnectionNotifier class MyApp extends StatelessWidget

Apr 30, 2022
Owner
Progressive Mobile
Develop cross platform applications on Flutter
Progressive Mobile
Cupertino version of the Material Stepper in Flutter

Cupertino Stepper for Flutter Cupertino version of the stock Material Stepper in Flutter. NOTE: This is not the same as the UIStepper control on iOS.

J-P Nurmi 18 Oct 13, 2022
Animation Examples: stepper Counter loading Ripple Circle Generator water Flow Animation Wave

AnimatioExamples(stepperCounter-loadingRippleCircleGenerator-waterFlowAnimationWave) A new Flutter project. Getting Started This project is a starting

Ahmed Abdelkader Khedr 9 Nov 1, 2022
A Flutter plugin for changing the Home Screen, Lock Screen (or both) Wallpaper on Android devices.

wallpaper_manager A Flutter plugin for changing the Home Screen, Lock Screen (or both) Wallpaper(s) on Android devices. Usage Installation In the pubs

Aditya Mulgundkar 38 Nov 28, 2022
A flutter package for showing a country code selector.

country_code_picker A flutter package for showing a country code selector. It supports i18n for 70 languages. Check the example on web! https://imtoor

Salvatore Giordano 221 Jan 5, 2023
Animated dialog box - A pure dart package for showing animated alert box.

animated_dialog_box A pure dart package for showing animated alert box. Getting Started https://github.com/Shubham-Narkhede/animated_dialog_box/blob/m

Shubham-Narkhede 10 Jul 24, 2022
A simple Flutter app showing cat images from CatApi

CAT APP A simple Flutter app showing cat images from CatApi USE Bloc REST API St

null 0 Jan 10, 2022
A simple yet powerful Flutter plugin for showing Toast at Android, iOS and Web.

Flutter Toast A simple yet powerful Flutter plugin for showing Toast at Android and iOS. Features: Native Toast Pure Flutter Toaster Installation Add

Eyro Labs 5 Dec 13, 2021
Just a simple interface showing a diamond, an imitation to that old application called I am rich .

i_am_rich A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Nixi 0 Dec 29, 2021
Crypto-currency - A Flutter application showing crypto currency rates

Features Crypto Currency rates This application allows to view crypto currency rates from Coin Market Cap. Getting started Get an API key at Coin Mark

Karol Lisiewicz 16 Oct 26, 2022
Flutterbiometric - A sample app showing how to implement biometric authentication in flutter

Flutter Tutorial - Fingerprint & Touch ID - Local Auth By using Flutter Local Au

null 0 Jan 1, 2022