mccounting_text 0.1.0

  • Readme
  • Changelog
  • Installing
  • 74

mccounting_text #

pipeline status MIT license PRs Welcome

About #

An animated Text widget that counts between two numbers on a duration, curve and style you specify.

Usage #


Basic #

Give McCountingText a begin and end and it will animate the count between those two numbers. You can count up or down, positive to negitive, including decimals.

    begin: 0,
    end: 30,

Gif Examples #

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title),),
      body: Center(
        child: Column(
          children: <Widget>[
            Text('You have pushed the button this many times:',),
              begin: 0,
              end: _counter.toDouble(),
              style: Theme.of(context).textTheme.display2,
              duration: Duration(seconds: 1),
              curve: Curves.decelerate,
            Text('Set your own duration and curve:',),
              begin: 0,
              end: _counter.toDouble(),
              precision: 1,
              style: Theme.of(context).textTheme.display2,
              duration: Duration(seconds: 3),
              curve: Curves.linear,
            Text('Choose precision between 0-20:',),
              begin: 0,
              end: _counter.toDouble(),
              precision: 2,
              style: Theme.of(context).textTheme.display2,
              duration: Duration(seconds: 1),
              curve: Curves.fastOutSlowIn,
            Text('Count down:',),
              begin: _counter.toDouble(),
              end: 0,
              precision: 3,
              style: Theme.of(context).textTheme.display2,
              duration: Duration(seconds: 1),
              curve: Curves.ease,
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),

0.1.0 #

  • Initial Open Source release.

Use this package as a library

1. Depend on it

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

  mccounting_text: ^0.1.0

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:mccounting_text/mccounting_text.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Format lib/mccounting_text.dart.

Run flutter format to format lib/mccounting_text.dart.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and mccounting_text.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies