이 스토리 패키지는 부드러운 애니메이션과 높은 사용자 정의 가능성을 갖춘 인스타그램 스토리와 유사한 UI를 제공합니다. 개발자가 사용자 정의 가능한 전환 효과, 타이머 및 콘텐츠 레이아웃을 갖춘 상호작용형 스와이프 가능한 스토리 카드를 만들 수 있도록 합니다. 동적 스토리텔링 경험을 필요로 하는 앱에 적합하며 모바일, 웹, 데스크톱 등 다양한 플랫폼을 지원합니다. 이 패키지는 플러터 위젯 시스템과의 간편한 통합을 위해 설계되었으며 외관과 동작 모두에 대해 광범위한 스타일링 옵션을 제공합니다.
사용 사례
소셜 미디어 스타일의 스토리 피드 만들기
인터랙티브 튜토리얼 또는 온보딩 흐름 구축
제한된 시간 동안의 콘텐츠 업데이트 표시
매력적인 마케팅 캠페인 기획
사용자 프로필 스토리 하이라이트 구현
주요 기능
풍부하고 애니메이션된 스토리 전환
사용자 정의 가능한 스토리 카드 레이아웃
다중 플랫폼에서의 스와이프 제스처 지원
사용자 지정 가능한 기간 및 진행률 표시기
확장 가능한 테마 및 스타일 옵션
적합한 대상
소셜 기능을 구축하는 개발자
시간 제한된 콘텐츠 전달이 필요한 앱
애니메이션 UI 컴포넌트를 찾는 디자이너
스토리처럼 생긴 인터페이스를 갖춘 크로스 플랫폼 애플리케이션
고려 사항
이동 중 상태를 신중하게 다뤄야 합니다
큰 스토리 세트와 함께 성능에 영향을 줄 수 있습니다
제한된 내장 분석 또는 추적
매우 긴 이야기에 최적화되지 않음
고급 효과를 위해 외부 애니메이션 라이브러리에 의존합니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Instagram stories like UI with rich animations and customizability.
Usage
StoryPageView requires at least three arguments: itemBuilder, pageLength, and storyLength.
/// Minimum example to explain the usage.returnScaffold(
body: StoryPageView(
itemBuilder: (context, pageIndex, storyIndex) {
returnCenter(
child: Text("Index of PageView: $pageIndex Index of story on each page: $storyIndex"),
);
},
storyLength: (pageIndex) {
return3;
},
pageLength: 4,
);
itemBuilder builds the content of each story and is called with the index of the pageView and
the index of the story on the page.
storyLength decides the length of story for each page. The example above always returns 3, but
it should depend on pageIndex.
pageLength is just the length of StoryPageView
The example above just shows 12 stories by 4 pages, which is not practical.
This one is the proper usage, extracted from example.
Once the instance is passed to StoryPageView, you can stop handle the indicator by the methods
below.
/// To pause the indicator
indicatorAnimationController.value = IndicatorAnimationCommand.pause;
/// To resume the indicator
indicatorAnimationController.value = IndicatorAnimationCommand.resume;