linear_progress_bar

Advanced linear progress indicator like Native Android Progress Bar

pub package

drawing drawing

Features

  • Linear progress bar
  • Set max progress value
  • Set current progress value
  • Color animation
  • Progress based on a current step
  • Progress and background color
  • Custom size

Getting started

You should ensure that you add the router as a dependency in your flutter project.

dependencies:
 linear_progress_bar: "^1.0.0+3"

You should then run flutter packages upgrade or update your packages in IntelliJ.

Example Project

There is a example project in the example folder. Check it out. Otherwise, keep reading to get up and running.

Usage

Need to include the import the package to the dart file where it will be used, use the below command,

import 'package:linear_progress_bar/linear_progress_bar.dart';

Basic Widget usage

new LinearProgressBar(
      maxSteps: 6,
      currentStep: 1,
      progressColor: Colors.red,
      backgroundColor: Colors.grey,
    )

Advanced Widget usage

new LinearProgressBar(
      maxSteps: 6,
      currentStep: currentStep,
      progressColor: Colors.red,
      backgroundColor: Colors.grey,
      valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
      semanticsLabel: "Label",
      semanticsValue: "Value",
      minHeight: 10,
  )

Complete example

@override
Widget build(BuildContext context) {
  return Scaffold(
    appBar: new AppBar(
      title: new Text("Linear Progress Bar"),
    ),
    body: Center(
      child: LinearProgressBar(
        maxSteps: 6,
        currentStep: currentStep,
        progressColor: Colors.red,
        backgroundColor: Colors.grey,
        valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
        semanticsLabel: "Label",
        semanticsValue: "Value",
        minHeight: 10,
      ),
    ),
  );
}

You can follow me on twitter @maravilhosinga

Libraries

linear_progress_bar