FLUTTER ECOSYSTEM

pacifio/route_transitions

유용한 애니메이션과 라우팅을 위한 친절한 함수를 포함하는 플러터 라이브러리 🚦

route_transitions 프로젝트 이미지
Stars
42
Forks
7
최근 푸시(UTC)
2021. 7. 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,
    );
  },
)