glint 0.0.4
glint: ^0.0.4 copied to clipboard
A glint/shimmer reusable widget that can help you display bring simple yet nice-looking loading animation while keeping it's usage extremely simple.
Glint #
This glint/shimmer reuasable widget can help you display bring simple yet nice-looking loading animation while keeping it's usage extremely simple.
Installation #
Use following command line to add this package to your flutter project.
flutter pub add glint
Or manually add to your pubspec.yml
glint: ^0.0.4
Usage #
import 'package:glint/glint.dart';
ListView(
children: [
Glint(
isLoading: true,
glintItem: GlintItem(itemCount: 10, radius: 4),
child: Container(),
)
],
),
or
import 'package:glint/glint.dart';
Container(
child:
Glint(
isLoading: true,
glintItem: GlintItem(radius: 12),
child: Text('Something displayed here!')
)
],
),
Properties #
Glint
requires following parameters:
isLoading
: true / falseglintItem
: an object ofGlintItem
to be displayed during loadingchild
: child of the widget will be displayed whenisLoading
is false
GlintItem #
GlintItem(
spacing: 5,
itemCount: 10,
direction: Axis.vertical,
height: 50,
radius: 4,
)
spacing
is used to separate eachGlintItem
when displayed during loading.radius
is size of the border radius in circular shape, can be 0 to completely disable border radius.
the rest of the properties is self explanatory, some are not required and posses default values which are:
itemCount = 1
spacing = 5
direction = Axis.vertical
color = Colors.white
Contributing #
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.