mccounting_text 0.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new48

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 #

mccounting-text

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.

McCountingText(
    begin: 0,
    end: 30,
)

Gif Examples #

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title),),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('You have pushed the button this many times:',),
            McCountingText(
              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:',),
            McCountingText(
              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:',),
            McCountingText(
              begin: 0,
              end: _counter.toDouble(),
              precision: 2,
              style: Theme.of(context).textTheme.display2,
              duration: Duration(seconds: 1),
              curve: Curves.fastOutSlowIn,
            ),
            Text('Count down:',),
            McCountingText(
              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:


dependencies:
  mccounting_text: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages 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';
  
Version Uploaded Documentation Archive
0.1.0 Apr 13, 2019 Go to the documentation of mccounting_text 0.1.0 Download mccounting_text 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

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/README.md.

For more information see the pub package layout conventions.

Dependencies

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
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