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