flutter_counter 1.0.3

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 87

Flutter Counter (iOS & Android)

Description #

Flutter Counter is a plugin written in dart for flutter which is really simple and customizeable. Create it like any other widget, add params according to your need and presto! You have got the highly customizeable counter with callbacks. Zero boilerplate!



Getting Started #

Create this widget as you do with other widgets

Counter(
  initialValue: _defaultValue,
  minValue: 0,
  maxValue: 10,
  step: 0.5,
  decimalPlaces: 1,
  onChanged: (value) { // get the latest value from here
    setState(() {
      _defaultValue = value;
    });
  },
),

Constructor Options #

There are some required values and other are for the customization

  @required num initialValue    // default value
  @required this.minValue       // minimum value
  @required this.maxValue       // maximum value
  @required this.onChanged      // callback
  @required this.decimalPlaces  // decimal places you want to show the value of
  this.color                    // color of the buttons
  this.textStyle                // text style which displays the value
  this.step = 1                 // step you want to set to change value
  this.buttonSize = 25          // if you want to change size of button

Beautify your widget with provided customization. You can also change color and size of both buttons and text. Very simple to implement and looks awesome. You can find more details in sample app.

Contributions and Licence #


Pull requests are welcome! The best contributions will consist of substitutions or configurations for classes/methods known to block the main thread during a typical app lifecycle.

I would love to know if you are using Counter in your app, send an email to [Salmaan Ahmed](mailto:salmaan.ahmed@hotmail.com)

1.0.3 #

  • Better readme

1.0.2 #

  • Minor bug fixing

1.0.1 #

  • Description added and minor improvement and enhancements

1.0.0 #

  • Initial version, created by Salmaan Ahmed

example/README.md

Flutter Counter (iOS & Android)

Description #

Flutter Counter is a plugin written in dart for flutter which is really simple and customizeable. Create it like any other widget, add params according to your need and presto! You have got the highly customizeable counter with callbacks. Zero boilerplate!



Getting Started #

Create this widget as you do with other widgets

Counter(
  initialValue: _defaultValue,
  minValue: 0,
  maxValue: 10,
  step: 0.5,
  decimalPlaces: 1,
  onChanged: (value) { // get the latest value from here
    setState(() {
      _defaultValue = value;
    });
  },
),

Constructor Options #

There are some required values and other are for the customization

  @required num initialValue    // default value
  @required this.minValue       // minimum value
  @required this.maxValue       // maximum value
  @required this.onChanged      // callback
  @required this.decimalPlaces  // decimal places you want to show the value of
  this.color                    // color of the buttons
  this.textStyle                // text style which displays the value
  this.step = 1                 // step you want to set to change value
  this.buttonSize = 25          // if you want to change size of button

Beautify your widget with provided customization. You can also change color and size of both buttons and text. Very simple to implement and looks awesome. You can find more details in sample app.

Contributions and Licence #


Pull requests are welcome! The best contributions will consist of substitutions or configurations for classes/methods known to block the main thread during a typical app lifecycle.

I would love to know if you are using Counter in your app, send an email to [Salmaan Ahmed](mailto:salmaan.ahmed@hotmail.com)

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_counter: ^1.0.3

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:flutter_counter/flutter_counter.dart';
  
Version Uploaded Documentation Archive
1.0.3 Dec 17, 2018 Go to the documentation of flutter_counter 1.0.3 Download flutter_counter 1.0.3 archive
1.0.2 Dec 17, 2018 Go to the documentation of flutter_counter 1.0.2 Download flutter_counter 1.0.2 archive
1.0.1 Dec 17, 2018 Go to the documentation of flutter_counter 1.0.1 Download flutter_counter 1.0.1 archive
1.0.0 Dec 17, 2018 Go to the documentation of flutter_counter 1.0.0 Download flutter_counter 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
77
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
87
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/flutter_counter.dart. (-0.50 points)

Analysis of lib/flutter_counter.dart reported 1 hint:

line 9 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: Counter.selectedValue, Counter.color, Counter.textStyle

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
cupertino_icons ^0.1.2 0.1.2
flutter 0.0.0
Transitive dependencies
collection 1.14.11
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