패키지, 저장소 및 앱 카테고리 검색

page_flip_builder 표지
패키지 상세v0.1.4

page_flip_builder

앱에서 상호작용 가능한 페이지 전환 효과를 가능하게 하는 사용자 정의 플러터 위젯입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
360
좋아요
122
Pub 점수
145

패키지 설치

flutter pub add page_flip_builder

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

인터랙티브한 페이지 전환 애니메이션을 제공하는 플러터 위젯으로, 디지털 독서나 프레젠테이션 경험을 몰입감 있게 만들기에 적합합니다. 부드럽고 현실적인 페이지 전환 효과를 제공하여 전자책, 포트폴리오, 인터랙티브 튜토리얼 등의 앱에서 사용자 참여도를 높입니다. 성능과 커스터마이징을 고려해 제작되었으며, 터치 제스처를 지원하고 다양한 레이아웃에 통합할 수 있습니다. 패키지는 가볍고 모든 주요 플랫폼과 호환됩니다.

사용 사례

  • 디지털 책 읽기 기기
  • 인터랙티브 프레젠테이션
  • 포트폴리오 전시
  • 교육 앱
  • 게이밍 UI

주요 기능

  • 현실적인 페이지 전환 애니메이션
  • 제스처 기반 상호작용
  • 크로스 플랫폼 지원
  • 사용자 정의 전환 효과
  • 경량이고 효율적
  • 기존 위젯과의 간편한 통합

적합한 대상

  • 매력적인 UI를 원하는 앱 개발자
  • 전자책 또는 디지털 매거진 제작자
  • 인터랙티브 스토리텔링에 집중하는 디자이너
  • 교육 또는 튜토리얼 앱을 개발하는 개발자
  • 다중 플랫폼을 대상으로 하는 팀

고려 사항

  • 복잡한 레이아웃에 최적화가 필요할 수 있습니다
  • 성능은 장치 기능에 따라 달라집니다
  • 2차원 플립 효과에 한정됨(3차원 깊이 없음)
  • 고주파 애니메이션 루프에 적합하지 않습니다
  • 간단하고 집중적인 콘텐츠와 함께 사용하는 것이 가장 좋습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Page Flip Builder

Pub Language License Twitter

A custom Flutter widget that enables interactive page-flip transitions in your app.

You can use this to flip images, cards, or widgets of any size.

Preview

Page Flip screenshots

Card Flip screenshots

Also see the Flutter Web Live Preview.

Usage

Note: This package uses null-safety.

PageFlipBuilder is best used for full-screen page-flip transitions, but works with widgets of any size as long as their width and height is not unbounded.

PageFlipBuilder uses a drag gesture to interactively transition between a "front" and a "back" widget. These are specified with the frontBuilder and backBuilder arguments:

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Container(
        // add a black background to prevent flickering on Android when the page flips
        color: Colors.black,
        child: PageFlipBuilder(
          frontBuilder: (_) => LightHomePage(),
          backBuilder: (_) => DarkHomePage(),
        ),
      ),
    );
  }
}

By defalt the flip happens along the vertical axis, but you can change the flipAxis to Axis.horizontal if you want.

For more control, you can also add a GlobalKey<PageFlipBuilderState> and programmatically flip the page with a callback-based API:

class MyApp extends StatelessWidget {
  // used to flip the page programmatically
  final pageFlipKey = GlobalKey<PageFlipBuilderState>();
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Container(
        // add a black background to prevent flickering on Android when the page flips
        color: Colors.black,
        child: PageFlipBuilder(
          key: pageFlipKey,
          frontBuilder: (_) => LightHomePage(
            onFlip: () => pageFlipKey.currentState?.flip(),
          ),
          backBuilder: (_) => DarkHomePage(
            onFlip: () => pageFlipKey.currentState?.flip(),
          ),
          // flip the axis to horizontal
          flipAxis: Axis.horizontal,
          // customize tilt value
          maxTilt: 0.003,
          // customize scale
          maxScale: 0.2,
          // be notified when the flip has completed
          onFlipComplete: (isFrontSide) => print('isFrontSide: $isFrontSide'),
        ),
      ),
    );
  }
}

Features

  • Interactive flip transition using drag gestures (forward and reverse)
  • Fling animation to complete the transition on drag release
  • Flip page programmatically via callbacks
  • Flip around the horizontal or vertical axis
  • Flip widgets of any size
  • Customizable flip duration, tilt, scale

Testing the example app

Before running the example app, you need to create the ios, android, web folders as needed:

flutter create . --platform ios
flutter create . --platform android
flutter create . --platform web
LICENSE: MIT

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.