FLUTTER ECOSYSTEM

pacifio/route_transitions

便利なアニメーションとルーティング用の親しみやすい関数を含むFlutterライブラリ 🚦

route_transitions のプロジェクト画像
Stars
42
Forks
7
最終プッシュ(UTC)
2021/07/28
プロジェクト状態
公開中
Adib Mohsin GitHub avatar
GITHUB User

Adib Mohsin ↗

high on vector spaces

@antarys-ai Dhaka , Bangladesh 公式サイト ↗
言語DartSwiftKotlinObjective-C

技術トピック

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 1 件
  • flutter{"sdk":"flutter"}

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

Route transitions

https://raw.githubusercontent.com/pacifio/route_transitions/master/media/example.gif

Now supports latest dart null safety . This package has been rewritten to use friendly route functions to navigate even with your favourite route transition and ability to build custom animations with tansitionBuilder !

How to use

import 'package:route_transitions/route_transitions.dart';

ElevatedButton(
  onPressed: () => pushWidget(
    newPage: Dashboard(),
    context: context,
  ),
  child: Text("Push page"),
),

Friendly API

https://raw.githubusercontent.com/pacifio/route_transitions/master/media/friendly.png

For actual examples , check example/lib/main.dart

Custom animation with customAnimationWidget

customAnimationWidget(
  newPage: YourPage(),
  context: context,
  transitionBuilder:
      (context, animation, secondaryAnimation, child) {
    var begin = 0.0;
    var end = 1.0;
    var curve = Curves.easeIn;

    var tween = Tween(begin: begin, end: end)
        .chain(CurveTween(curve: curve));

    return ScaleTransition(
      scale: animation.drive(tween),
      child: child,
    );
  },
)