FLUTTER ECOSYSTEM

blaugold/circular_clip_route

원형 클리핑을 확장하여 페이지를 표시하는 페이지 라우트를 제공하는 플러터 패키지입니다.

circular_clip_route 프로젝트 이미지
Stars
31
Forks
3
최근 푸시(UTC)
2022. 6. 12.
프로젝트 상태
활성
Gabriel Terwesten GitHub avatar
GITHUB User

Gabriel Terwesten ↗

@lotumMunich
언어DartSwiftHTMLKotlinObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • pedantic개발 의존성^1.11.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

pub.dev package page GitHub Stars

A page route, which reveals its page by expanding a circular clip from an anchor widget.

https://raw.githubusercontent.com/blaugold/circular_clip_route/master/doc/example-screen-recording.gif

If you're looking for a database solution, check out cbl, another project of mine. It brings Couchbase Lite to standalone Dart and Flutter, with support for:

  • Full-Text Search,
  • Expressive Queries,
  • Data Sync,
  • Change Notifications

and more.


Getting started

To use the CircularClipRoute, provide it the context from which the animation should expand and push it onto the navigation stack. One way to get the right context is to use a Builder, which wraps the widget from which the route should expand:

final navigationTrigger = Builder(
    builder: (context) {
      return IconButton(
          icon: Icon(Icons.favorite),
          onPressed: () {
            Navigator.push(context, CircularClipRoute<void>(
              // This context will be used to determine the location and size of
              // the expanding clip. Here this will resolve to the `IconButton`.
              expandFrom: context,
              builder: (_) => MyRoute(),
            ));
          }
      );
    }
);

Also, take a look at the API docs for customizing the animation.

Example

The example implements the demo at the top.

References

Inspired by this shot.

This drawing visualizes the geometry involved in creating the route transition:

Illustration of the geometry of the transition

The Anchored Custom Routes article explains how to implement routes, that are anchored to a widget, generally.


Gabriel Terwesten • GitHub @blaugold • Twitter @GTerwesten • Medium @gabriel.terwesten