rive_animated_loaders 0.0.1
rive_animated_loaders: ^0.0.1 copied to clipboard
This package provides rive animated loaders that you can use in your projects.
Rive Animated Loaders #
A Flutter package that provides a set of ready-made, animated loading indicators built with Rive. Drop in a widget, set its color to match your brand, and you're done.
Features #
- 12 pre-built animated loaders, all bundled in a single rive asset.
- Simple static-method API:
RiveAnimatedLoader.<loaderName>(). - Optional color and size customization per loader.
Loaders #
|
Jumping Squares RiveAnimatedLoader.jumpingSquares()
|
Moving Cubes RiveAnimatedLoader.movingCubes()
|
Twin Spheres RiveAnimatedLoader.twinSpheres()
|
|
Jumping Circles RiveAnimatedLoader.jumpingCircles()
|
Beep Wave RiveAnimatedLoader.beepWave()
|
Infinite RiveAnimatedLoader.infinite()
|
|
Falling Cube RiveAnimatedLoader.fallingCube()
|
Circle Spinner RiveAnimatedLoader.circleSpinner()
|
Long Wave RiveAnimatedLoader.longWave()
|
|
Jumping Dot RiveAnimatedLoader.jumpingDot()
|
Spinning Dot RiveAnimatedLoader.spinningDot()
|
Rotating Circles RiveAnimatedLoader.rotatingCircles()
|
Getting started #
Add the package to your pubspec.yaml:
dependencies:
rive_animated_loaders: ^0.0.1
Then run:
flutter pub get
Usage #
Import the package and use any loader as a widget:
import 'package:flutter/material.dart';
import 'package:rive_animated_loaders/rive_animated_loaders.dart';
class LoadingView extends StatelessWidget {
const LoadingView({super.key});
@override
Widget build(BuildContext context) {
return Center(
child: RiveAnimatedLoader.jumpingSquares(),
);
}
}
Customizing color and size #
Most loaders accept an optional color and size:
RiveAnimatedLoader.circleSpinner(
color: Colors.deepPurple,
size: 64,
);
Two-tone loaders (twinSpheres, spinningDot, rotatingCircles) accept
color1 and color2 instead:
RiveAnimatedLoader.twinSpheres(
color1: Colors.deepPurple,
color2: Colors.amber,
);
size sets the loader's height; width defaults to twice the height.
When omitted, each loader falls back to its own built-in default color
and size.
See the example app for a full working demo that pages through every loader.
Additional information #
- Issues and feature requests: GitHub Issues
- Release history: see CHANGELOG.md.