flutter_spinkit 4.1.2+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 98

✨ Flutter Spinkit #

Build Status - Travis codecov pub package

A collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit.

🎖 Installing #

dependencies:
  flutter_spinkit: "^4.1.2"

⚡️ Import #

import 'package:flutter_spinkit/flutter_spinkit.dart';

🎮 How To Use #

const spinkit = SpinKitRotatingCircle(
  color: Colors.white,
  size: 50.0,
);
final spinkit = SpinKitFadingCircle(
  itemBuilder: (BuildContext context, int index) {
    return DecoratedBox(
      decoration: BoxDecoration(
        color: index.isEven ? Colors.red : Colors.green,
      ),
    );
  },
);
final spinkit = SpinKitSquareCircle(
  color: Colors.white,
  size: 50.0,
  controller: AnimationController(vsync: this, duration: const Duration(milliseconds: 1200)),
);

For more info, please, refer to the showcase.dart in the example.

🚀 Showcase #


RotatingPlain

DoubleBounce

Wave

WanderingCubes

FadingFour

FadingCube

Pulse

ChasingDots

ThreeBounce

Circle

CubeGrid

FadingCircle

RotatingCircle

FoldingCube

PumpingHeart

DualRing

HourGlass

PouringHourGlass

FadingGrid

Ring

Ripple

SpinningCircle

SquareCircle

Some GIF images gotten from Android Spinkit.

🐛 Bugs/Requests #

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on Github and I'll look into it. Pull request are also welcome.

❗️ Note #

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

☀️ Authors #

Jeremiah Ogbomo

Ayush Agarwal

⭐️ License #

MIT License

ChangeLog for Flutter Spinkit #

A collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit.

4.1.2+1 #

  • Upgrades the example to AndroidX

4.1.2 #

  • Introduced new itemCount property to SpinKitWave
  • Fixed broken calculations that made certain animations behave weirdly

4.1.1+1 #

  • Include Authors info in README

4.1.1 #

  • Utilize native flutter auto-reverse feature for AnimationController

4.1.0 #

  • Introduces a new SpinKit [SpinKitSquareCircle]
  • Introduces const SpinKits
  • Improve code quality across all spinners

Before #

final spinkit = SpinKitSquareCircle(color: Colors.white, size: 50.0);

Now, all SpinKits can be initialized as consts #

const spinkit = SpinKitSquareCircle(color: Colors.white, size: 50.0);

4.0.0 #

Feature #

final spinkit = SpinKitFadingCircle(
  color: Colors.white,
  size: 50.0,
  controller: AnimationController(vsync: this, duration: const Duration(milliseconds: 1200)),
);
  • [DualRing] lineWidth parameter 9bcfd5. Closes #42

3.1.0 #

Feature #

Fixes #

  • state disposed before ticker 0c9b6e3

3.0.0 #

Before #

final spinkit = SpinKitFadingCircle(color: Colors.white, size: 50.0);

Now, there is an itemBuilder alternative #

final spinkit = SpinKitFadingCircle(
  itemBuilder: (_, int index) {
    return DecoratedBox(
      decoration: BoxDecoration(
        color: index.isEven ? Colors.red : Colors.green,
      ),
    );
  },
);

Which produces #

example/lib/main.dart

import 'package:flutter/material.dart';

import './showcase.dart';
import './workspace.dart';

void main() => runApp(App());

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'SpinKit Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        brightness: Brightness.dark,
      ),
      home: Scaffold(
        body: SafeArea(
          child: Stack(
            children: <Widget>[
              Align(
                child: LayoutBuilder(
                  builder: (context, _) {
                    return IconButton(
                      icon: Icon(Icons.play_circle_filled),
                      iconSize: 50.0,
                      onPressed: () {
                        Navigator.push(
                          context,
                          MaterialPageRoute<void>(
                            builder: (BuildContext context) => ShowCase(),
                            fullscreenDialog: true,
                          ),
                        );
                      },
                    );
                  },
                ),
                alignment: Alignment.bottomCenter,
              ),
              Positioned.fill(
                child: Center(
                  child: WorkSpace(),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_spinkit: ^4.1.2+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:flutter_spinkit/flutter_spinkit.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
99
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
92
Overall:
Weighted score of the above. [more]
98
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [flutter_spinkit] that is in a package requiring null.

Health suggestions

Format lib/src/chasing_dots.dart.

Run flutter format to format lib/src/chasing_dots.dart.

Format lib/src/circle.dart.

Run flutter format to format lib/src/circle.dart.

Format lib/src/cube_grid.dart.

Run flutter format to format lib/src/cube_grid.dart.

Fix additional 21 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/double_bounce.dart (Run flutter format to format lib/src/double_bounce.dart.)
  • lib/src/dual_ring.dart (Run flutter format to format lib/src/dual_ring.dart.)
  • lib/src/fading_circle.dart (Run flutter format to format lib/src/fading_circle.dart.)
  • lib/src/fading_cube.dart (Run flutter format to format lib/src/fading_cube.dart.)
  • lib/src/fading_four.dart (Run flutter format to format lib/src/fading_four.dart.)
  • lib/src/fading_grid.dart (Run flutter format to format lib/src/fading_grid.dart.)
  • lib/src/folding_cube.dart (Run flutter format to format lib/src/folding_cube.dart.)
  • lib/src/hour_glass.dart (Run flutter format to format lib/src/hour_glass.dart.)
  • lib/src/pouring_hour_glass.dart (Run flutter format to format lib/src/pouring_hour_glass.dart.)
  • lib/src/pulse.dart (Run flutter format to format lib/src/pulse.dart.)
  • lib/src/pumping_heart.dart (Run flutter format to format lib/src/pumping_heart.dart.)
  • lib/src/ring.dart (Run flutter format to format lib/src/ring.dart.)
  • lib/src/ripple.dart (Run flutter format to format lib/src/ripple.dart.)
  • lib/src/rotating_circle.dart (Run flutter format to format lib/src/rotating_circle.dart.)
  • lib/src/rotating_plain.dart (Run flutter format to format lib/src/rotating_plain.dart.)
  • lib/src/spinning_circle.dart (Run flutter format to format lib/src/spinning_circle.dart.)
  • lib/src/square_circle.dart (Run flutter format to format lib/src/square_circle.dart.)
  • lib/src/three_bounce.dart (Run flutter format to format lib/src/three_bounce.dart.)
  • lib/src/tweens/delay_tween.dart (Run flutter format to format lib/src/tweens/delay_tween.dart.)
  • lib/src/wandering_cubes.dart (Run flutter format to format lib/src/wandering_cubes.dart.)
  • lib/src/wave.dart (Run flutter format to format lib/src/wave.dart.)

Maintenance suggestions

Update README.md. (-8 points)

4 image links are insecure (e.g. http://www.iconninja.com/files/241/825/211/round-collaboration-social-github-code-circle-network-icon.svg), use https URLs instead.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test