Flutter Stories는 소셜 미디어 앱에서 볼 수 있는 스토리 보기 메커니즘을 구현하는 Flutter 패키지입니다. 이미지, 비디오 또는 텍스트와 같은 순차 콘텐츠를 전체 화면 및 스와이프 가능한 형식으로 표시할 수 있는 사용자 정의 가능한 위젯을 제공합니다. 크로스 플랫폼 사용을 위해 설계되어 Android, iOS, Web, macOS, Windows, Linux를 지원합니다. 이 패키지는 개발자가 최소한의 설정과 높은 성능으로 애플리케이션에 스토리 유사 경험을 쉽게 통합할 수 있도록 합니다.
사용 사례
소셜 미디어 앱 업데이트
사용자 온보딩 튜토리얼
제품 전시 기능
인터랙티브 콘텐츠 슬라이드
실시간 이벤트 하이라이트
주요 기능
스토리 간 스와이프 탐색
사용자 정의 가능한 스토리 기간
이미지, 비디오 및 위젯 지원
크로스 플랫폼 호환성
내장형 진행률 표시기
기존 UI와의 간편한 통합
적합한 대상
소셜 앱을 개발하는 개발자
인터랙티브 온보딩 흐름을 만드는 팀
시각적 스토리텔링을 구현하는 디자이너
시간 제한 콘텐츠 표시가 필요한 앱
경량 스토리 구성 요소가 필요한 프로젝트
고려 사항
큰 미디어 파일을 조심스럽게 다뤄야 합니다
브랜드 일관성을 위해 맞춤 스타일링이 필요할 수 있습니다
제한된 내장 애니메이션 옵션
매우 긴 스토리 시퀀스에 최적화되지 않음
비디오 재생을 위해 외부 종속성에 의존합니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
flutter_stories
Widget that brings stories mechanism to your apps
Advantages:
Simple to use and intuitive API
Lightweight (~200 lines of code)
Feels familiar if you've used Instagram or Snapchat stories before
Can be used with Cupertino and Material packages independently
Tap the right portion of the screen to switch to the next moment. You can specify onFlashForward callback to control app behavior in this case or when story finishes
Tap the left portion of the screen to switch to the previous moment. Similar to right tap, but uses onFlashBack
Long press (hold) the screen to hide the progress segments and pause story, release to show controls and unpause
API
property
type
required
description
momentCount
int
true
Sets the number of moments in story
momentDurationGetter
(int index) => Duration
true
Function that must return Duration for each moment
momentBuilder
(BuildContext context, int index) => Widget
true
Builder that gets executed for each moment
onFlashForward
() => void
false
Gets executed when user taps the right portion of the screen on the last moment in story or when story finishes playing
onFlashBack
() => void
false
Gets executed when user taps the left portion of the screen on the first moment in story
startAt
int
false
Defaults to 0. Sets the index of the first moment that will be displayed
momentSwitcherFraction
double
false
Defaults to 0.33. `sets the ratio of left and right tappable portions of the screen: left for switching back, right for switching forward