animated_page_transition
このパッケージはアニメーション付きページ遷移用です。使いやすいパッケージです。pubspec.yamlファイルにanimation_page_transitionの依存関係を追加してください。その後、実装ファイルにパッケージをインポートし、アニメーション付きページ遷移を非常に簡単に実装できます。
このパッケージはアニメーション付きページ遷移用です
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
This package for page transition animation. With this package you can give have smooth page transitions in your apps. chack out the video given below!!!
Add animation_page_transition dependency into the pubspec.yaml file
then import package into the implementation file/s.
import 'package:animated_page_transition/animated_page_transition.dart';
You can implement animated page transition very easily.
First of all wrap your button with [PageTransitionButton] widget, example code is given below:
To use [PageTransitionButton] you have to add [TickerProviderStateMixin] into your widget.
class HomeScreen extends StatefulWidget {
const HomeScreen({Key? key}) : super(key: key);
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: PageTransitionButton(
vsync: this,
child: Container(
height: 120,
width: 120,
decoration: BoxDecoration(
color: const Color(0xFFFF9735),
borderRadius: BorderRadius.circular(10),
),
),
nextPage: const SecondScreen(),
),
),
);
}
}
Then wrap the scaffold of the second screen with [PageTransitionReceiver] widget where you want to navigate it as given below:
class SecondScreen extends StatelessWidget {
const SecondScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return PageTransitionReceiver(
scaffold: const Scaffold(
backgroundColor: Color(0xFFFF9735),
),
);
}
}
And now you are ready to go!!!
Have fun and happy coding ;)
依存関係一覧 3 件
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗