분류, 패키지 및 저장소 검색

smooth_page_indicator 표지
패키지 상세v3.0.0

smooth_page_indicator

내장된 효과 세트를 갖춘 사용자 정의 가능한 애니메이션 페이지 인디케이터입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
60.7만
좋아요
4.1천
Pub 점수
160

패키지 설치

flutter pub add smooth_page_indicator

패키지 개요

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

Smooth Page Indicator는 Flutter용으로 사용 가능한 사용자 정의가 가능하고 애니메이션 효과를 갖춘 페이지 인디케이터로, 다양한 내장 시각적 효과를 지원합니다. PageView 위젯과 원활하게 통합되어 스크롤 가능한 페이지 목록에서 현재 위치에 대한 직관적인 피드백을 사용자에게 제공합니다. 패키지는 부드러운 전환과 동적 스타일 옵션을 제공하여 개발자가 앱의 디자인 언어에 맞춰 외관과 행동을 조정할 수 있도록 합니다. 모든 주요 플랫폼을 지원하여 모바일, 웹, 데스크톱 환경에서 일관된 사용자 경험을 보장합니다.

사용 사례

  • 온보딩 흐름에서 진행 상황 표시
  • 이미지 슬라이더의 사용자 경험 향상
  • 다단계 양식의 단계 시각화
  • 탭 간 애니메이션 탐색
  • 매력적인 튜토리얼 화면 만들기

주요 기능

  • 내장 애니메이션 효과
  • 사용자 지정 가능한 색상 및 크기
  • 여러 페이지 뷰 유형 지원
  • 다양한 플랫폼 간 반응형 디자인
  • PageView와의 간편한 통합
  • 확장 가능한 효과 시스템

적합한 대상

  • 온보딩 화면
  • 이미지 갤러리
  • 다단계 워즈
  • 인터랙티브 튜토리얼
  • 모바일 및 웹 애플리케이션

고려 사항

  • 많은 지표와 함께 성능에 영향을 줄 수 있습니다
  • 복잡한 애니메이션을 위해 신중한 튜닝이 필요합니다
  • 코드 확장 없이 제한된 사용자 정의
  • 정적이고 애니메이션되지 않은 표시기에는 적합하지 않습니다
  • 보통 페이지 수와 함께 사용할 때 가장 좋습니다

원본 README

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

smooth_page_indicator

MIT License stars pub version Buy Me A Coffee

Introduction

Page indicators are a crucial part of any app that involves multiple pages. They help users to
understand the number of pages and their current position. SmoothPageIndicator is a Flutter
package that provides a set of animated page indicators with a variety of effects.

Effects

SmoothPageIndicator comes with a set of built-in effects that you can use to animate the active dot,
you can also customize each effect to your liking.

for more specific customization, try the CustomizableEffect which allows for more customization.

Effect Preview
Worm
Worm style = WormStyle.thin [v1.0.0]
Expanding Dots
Jumping dot
Jumping dot with vertical offset [v1.0.0]
Scrolling Dots
Slide
Scale
Swap
Swap type = SwapType.yRotation [v1.0.0]
Color Transition [0.1.2]
Customizable demo-1 [v1.0.0]
Customizable demo-2 [v1.0.0]
Customizable demo-3 [v1.0.0]
Customizable demo-4 [v1.0.0]

Usage

SmoothPageIndicator uses the PageController's scroll offset to animate the active dot.

SmoothPageIndicator(    
   controller: controller,  // PageController    
   count:  6,    
   effect:  WormEffect(),  // your preferred effect    
   onDotClicked: (index){    
  }
)    
   

Usage without a PageController

Unlike SmoothPageIndicator, AnimatedSmoothIndicator is self animated and all it needs is the
active index.

AnimatedSmoothIndicator(    
   activeIndex: yourActiveIndex,    
   count: 6,    
   effect: WormEffect(), 
)    

Vertical layout support

Smooth page indicator supports both horizontal and vertical layouts.

SmoothPageIndicator(    
   controller: controller,  // PageController    
   count:  6,    
   axisDirection: Axis.vertical,    
   effect:  WormEffect(), 
)    

Scrolling dots effect

Smooth page indicator comes with a shipped it scrolling dots effect, (similar to the one used in instagram), it's useful when you have a large number of pages.

Customization

Each effect comes with its own set of properties that you can customize to your liking.
for example, you can customize direction, width, height, radius, spacing, paint style, color and more... of SlideEffect like follows:

  SmoothPageIndicator(    
   controller: controller,    
   count:  6,    
   axisDirection: Axis.vertical,    
   effect:  SlideEffect(    
      spacing:  8.0,    
      radius:  4.0,    
      dotWidth:  24.0,    
      dotHeight:  16.0,    
      paintStyle:  PaintingStyle.stroke,    
      strokeWidth:  1.5,    
      dotColor:  Colors.grey,    
      activeDotColor:  Colors.indigo    
  ), 
)    
   

Default Colors

By default, indicators use these fallback colors:

  • activeDotColor: Color(0xFF3F51B5)
  • dotColor: Color(0xFF9E9E9E)

These colors do not come from the app's ThemeData. Override them for a subtree with SmoothPageIndicatorTheme, or set dotColor and activeDotColor directly on an effect.

SmoothPageIndicatorTheme

SmoothPageIndicatorTheme is an InheritedTheme that configures default settings for descendant SmoothPageIndicator and AnimatedSmoothIndicator widgets. Wrap the subtree that should share the configuration:

MaterialApp(
  home: SmoothPageIndicatorTheme(
    effect: ExpandingDotsEffect(), // default effect when none is specified
    defaultColors: DefaultIndicatorColors(
      active: Colors.blue,
      inactive: Colors.grey,
    ),
    child: MyHomePage(),
  ),
)
  • defaultColors: Applies to all descendant indicator effects unless dotColor or activeDotColor is set on the effect.
  • effect: The default effect when an indicator does not specify one. If omitted, WormEffect is used.

This provides consistent indicator styling without relying on or modifying the app theme.

Support the Library

You can support the library by liking it on pub, staring in on Github and reporting any bugs you
encounter.

카테고리

소스 저장소

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

순위