smart_stepper 0.0.6 copy "smart_stepper: ^0.0.6" to clipboard
smart_stepper: ^0.0.6 copied to clipboard

smart_stepper is a lightweight and customizable Flutter widget that helps you build clean and modern step indicators for multi-step processes such as onboarding, forms, or checkout flows. It lets you [...]

example/example.md

import 'package:flutter/material.dart';
import 'package:smart_stepper/smart_stepper.dart';

class SmartStepperExample extends StatefulWidget {
  const SmartStepperExample({super.key});

  @override
  State<SmartStepperExample> createState() => _SmartStepperExampleState();
}

class _SmartStepperExampleState extends State<SmartStepperExample> {
  int currentStep = 3;
  int totalSteps = 4;
  int currentStep1 = 2;
  int currentStep2 = 1;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.blue,
        title: const Text(
          "Smart Stepper Example",
          style: TextStyle(color: Colors.white),
        ),
      ),
      body: Column(
        children: [
          const SizedBox(height: 12),
          const Text(
            "Example",
            style: TextStyle(color: Colors.black, fontSize: 22),
          ),
          SmartStepper(
            currentStep: currentStep,
            totalSteps: totalSteps,
            onStepperTap: (value) {
              setState(() {
                currentStep = value;
              });
            },
          ),
          const SizedBox(height: 24),
          const Text(
            "Example - 1",
            style: TextStyle(color: Colors.black, fontSize: 22),
          ),
          SmartStepper(
            currentStep: currentStep1,
            totalSteps: totalSteps,
            completeStepColor: Colors.orange,
            currentStepColor: Colors.red,
            inactiveStepColor: Colors.purple,
            borderWidth: 0,
            onStepperTap: (value) {
              setState(() {
                currentStep1 = value;
              });
            },
          ),
          const SizedBox(height: 24),
          const Text(
            "Example - 2",
            style: TextStyle(color: Colors.black, fontSize: 22),
          ),
          SmartStepper(
            currentStep: currentStep2,
            totalSteps: totalSteps,
            isTextShowing: false,
            borderWidth: 0,
            onStepperTap: (value) {
              setState(() {
                currentStep2 = value;
              });
            },
          ),
          const SizedBox(height: 24),
          const Text(
            "Example - 3",
            style: TextStyle(color: Colors.black, fontSize: 22),
          ),
          SmartStepper(
            currentStep: currentStep1,
            totalSteps: totalSteps,
            completeStepColor: Colors.orange,
            currentStepColor: Colors.red,
            inactiveStepColor: Colors.purple,
            completeBorderColor: Colors.yellow,
            currentBorderColor: Colors.green,
            inactiveBorderColor: Colors.cyan,
            borderWidth: 2,
            onStepperTap: (value) {
              setState(() {
                currentStep1 = value;
              });
            },
          ),
          const SizedBox(height: 24),
          const Text(
            "Example - 4",
            style: TextStyle(color: Colors.black, fontSize: 22),
          ),
          SmartStepper(
            currentStep: currentStep2,
            totalSteps: totalSteps,
            completeTextColor: Colors.black,
            currentTextColor: Colors.red,
            inactiveTextColor: Colors.blue,
            borderWidth: 2,
            onStepperTap: (value) {
              setState(() {
                currentStep2 = value;
              });
            },
          ),
          const SizedBox(height: 24),
          const Text(
            "Example - 5",
            style: TextStyle(color: Colors.black, fontSize: 22),
          ),
          SmartStepper(
            currentStep: currentStep,
            totalSteps: totalSteps,
            completeLineColor: Colors.black,
            currentLineColor: Colors.red,
            inactiveLineColor: Colors.blue,
            lineHeight: 10,
            lineWidth: 50,
            lineBorderRadius: 12,
            linePadding: const EdgeInsets.symmetric(horizontal: 12),
            onStepperTap: (value) {
              setState(() {
                currentStep = value;
              });
            },
          ),
          const SizedBox(height: 12),
          const Text(
            "Example - 6",
            style: TextStyle(color: Colors.black, fontSize: 22),
          ),
          SmartStepper(
            currentStep: currentStep1,
            totalSteps: totalSteps,
            stepWidth: 48,
            stepHeight: 48,
            completeStepColor: Colors.orange,
            currentStepColor: Colors.red,
            inactiveStepColor: Colors.purple,
            onStepperTap: (value) {
              setState(() {
                currentStep1 = value;
              });
            },
          ),
        ],
      ),
    );
  }
}
3
likes
140
points
110
downloads

Publisher

verified publisherjanishuni.com

Weekly Downloads

smart_stepper is a lightweight and customizable Flutter widget that helps you build clean and modern step indicators for multi-step processes such as onboarding, forms, or checkout flows. It lets you style steps and connecting lines with different colors, sizes, and shapes while supporting interactive step navigation through tap gestures.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on smart_stepper