intervalprogressbar 1.0.1

IntervalProgressBar #

Package

An interval progress widget for Flutter.

Preview #

demo

Depend on it #

https://pub.dev/packages/intervalprogressbar

Add this to your package's pubspec.yaml file:

dependencies:
  intervalprogressbar: ^{last_version}

Features #

  • Horizontal
  • Vertical
  • Interval Progress
  • Colorful

Getting Started #

Preview Sample Code #

Center(
   child: Row(
       mainAxisAlignment: MainAxisAlignment.center,
       children: [10, 29, 18, 27, 16, 15, 24, 3, 20, 10].map<Widget>((i) {
         return Padding(
             padding: EdgeInsets.only(right: 10),
             child: IntervalProgressBar(
                 direction: IntervalProgressDirection.vertical,
                 max: 30,
                 progress: i,
                 intervalSize: 2,
                 size: Size(12, 200),
                 highlightColor: Colors.red,
                 defaultColor: Colors.grey,
                 intervalColor: Colors.transparent,
                 intervalHighlightColor: Colors.transparent,
                 reverse: true,
                 radius: 0));
       }).toList()),
)

Property #

Propertytypenote
directionenumProgressBar's direction, support vertical and horizontal
maxintcount of default blocks
progressintcount of highlight blocks
intervalSizeintsize of interval blocks. when vertical direction, means height, when horizontal direction, means width
sizeSizesize of this widget
highlightColorColorcolor of highlight blocks
defaultColorColorcolor of default blocks
intervalColorColorcolor of default intervals
intervalHighlightColorColorcolor of intervals which between highlight blocks
reversebool
radiusint

[0.0.3] - 2019/06/09.

  • implement horizontal, vertical progress
  • implement colorful progress

example/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:intervalprogressbar/intervalprogressbar.dart';

Widget buildProgressBars() {
  return Center(
    child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [10, 29, 18, 27, 16, 15, 24, 3, 20, 10].map<Widget>((i) {
          return Padding(
              padding: EdgeInsets.only(right: 10),
              child: IntervalProgressBar(
                  direction: IntervalProgressDirection.vertical,
                  max: 30,
                  progress: i,
                  intervalSize: 2,
                  size: Size(12, 200),
                  highlightColor: Colors.red,
                  defaultColor: Colors.grey,
                  intervalColor: Colors.transparent,
                  intervalHighlightColor: Colors.transparent,
                  reverse: true,
                  radius: 0));
        }).toList()),
  );
}

void main() {
  final app = MaterialApp(home: buildProgressBars());
  runApp(app);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  intervalprogressbar: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:intervalprogressbar/intervalprogressbar.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
72
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
86
Learn more about scoring.

We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
pedantic ^1.5.0 1.8.0+1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test