progress_indicators 0.1.0 progress_indicators: ^0.1.0 copied to clipboard
A handful collection of some cool progress indicators and text animators.
import 'package:flutter/material.dart';
import 'package:progress_indicators/progress_indicators.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Progress Indicators',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(title: 'Progress Indicators'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
print(Offset(0.0, -1.0).distanceSquared - Offset(0.0, 0.0).distanceSquared);
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Center(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text('Jumping dots'),
JumpingDotsProgressIndicator(
fontSize: 20.0,
),
SizedBox(height: 60.0),
new Text('Heartbeat'),
SizedBox(height: 16.0),
HeartbeatProgressIndicator(
child: Icon(Icons.home),
),
SizedBox(height: 60.0),
new Text('Glowing'),
GlowingProgressIndicator(
child: Icon(Icons.home),
),
SizedBox(height: 32.0),
FadingText('Loading...'),
SizedBox(height: 32.0),
JumpingText('Loading...'),
SizedBox(height: 32.0),
ScalingText('Loading...'),
SizedBox(height: 32.0),
CollectionSlideTransition(
children: <Widget>[
Icon(Icons.android),
Icon(Icons.apps),
Icon(Icons.announcement),
],
),
SizedBox(height: 32.0),
CollectionScaleTransition(
children: <Widget>[
Icon(Icons.android),
Icon(Icons.apps),
Icon(Icons.announcement),
],
),
],
),
),
);
}
}