show_up_animation 2.0.0 show_up_animation: ^2.0.0 copied to clipboard
A flutter package to simplify the implementation of "show up" animation
import 'package:example/show_up_demo.dart';
import 'package:example/show_up_list_demo.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
final String title = "Show up Demo";
@override
Widget build(BuildContext context) {
return MaterialApp(
title: this.title,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: this.title),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Choose a demo"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
ElevatedButton(
child: Text("Show Up Animation"),
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return ShowUpDemo();
},
),
);
},
),
SizedBox(height: 40),
ElevatedButton(
child: Text("Show Up List"),
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return ShowUpListDemo();
},
),
);
},
),
// SizedBox(height: 40),
// RaisedButton(
// child: Text("Show Up Builder"),
// onPressed: () {
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (BuildContext context) {
// return ShowUpBuilderDemo();
// },
// ),
// );
// },
// ),
],
),
),
);
}
}