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

story_view 표지
패키지 상세v0.16.6

story_view

WhatsApp 및 인스타그램처럼 스토리를 표시합니다. 구글 뉴스 앱처럼 ListView 또는 Column 내부에 인라인으로 사용할 수 있습니다. 일시정지, 다음 페이지로 이동, 이전 페이지로 돌아가기 등의 제스처가 포함되어 있습니다.

AndroidiOSmacOS
30일 다운로드
2.2만
좋아요
822
Pub 점수
150

패키지 설치

flutter pub add story_view

패키지 개요

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

StoryView는 WhatsApp 및 인스타그램과 유사한 상호작용형 스와이프 가능한 스토리를 표시할 수 있도록 해주는 플러터 패키지입니다. 리스트나 컬럼 내부에 직접 통합할 수 있어 뉴스 피드나 소셜 미디어 앱에 이상적입니다. 패키지에는 스토리 페이지를 일시정지, 다음으로 넘기고 이동하는 등의 내장 제스처가 포함되어 있습니다. 다양한 플랫폼에서 원활한 성능을 위해 설계되었으며, 안드로이드, iOS, macOS에서 원활하게 작동합니다. pub add를 통해 최소한의 설정만으로도 사용자 정의 가능한 컨트롤과 애니메이션을 갖춘 네이티브처럼 느껴지는 스토리텔링 경험을 제공합니다.

사용 사례

  • 소셜 미디어 스토리 피드
  • 뉴스 앱 콘텐츠 표시
  • 앱 내 스토리텔링 기능
  • 사용자 참여 캠페인
  • 인터랙티브 제품 투어

주요 기능

  • 스토리 간 스와이프 탐색
  • 일시정지 및 재개 기능
  • 제스처 기반 제어
  • ListView/Column 내의 인라인 배치
  • 크로스 플랫폼 지원 (Android, iOS, macOS)

적합한 대상

  • 인스타그램 스타일의 스토리 UI가 필요한 앱
  • 콘텐츠 중심 애플리케이션
  • 참여도 기반 모바일 경험
  • 간단한 스토리 구현을 찾는 개발자
  • 풍부한 제스처 상호작용이 필요한 프로젝트

고려 사항

  • 긴 스토리 시퀀스에 대한 최적화가 필요할 수 있습니다
  • 스토리 카드 디자인의 사용자 정의가 제한적
  • 완전한 기능을 위해 외부 이미지/비디오 로딩에 의존합니다
  • 기본 전환을 넘어서는 복잡한 애니메이션에는 적합하지 않습니다
  • 고해상도 미디어 사용 시 성능이 달라질 수 있습니다

원본 README

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

story_view Pub

Story view for apps with stories.

story_view

🍟 Watch video demo here: story_view demo

👨‍🚀 Demo project here: storyexample

This a Flutter widget to display stories just like Whatsapp and Instagram. Can also be used inline/inside ListView or Column just like Google News app. Comes with gestures to pause, forward and go to previous page.

Features

🕹 Still image, GIF and video support (with caching enabled)

📍 Gesture for pause, rewind and forward

⚜️ Caption for each story item

🎈 Animated progress indicator for each story item

📱 Fullscreen or inline

And useful callback to perform meta functionalities including vertical swipe gestures.

Installation

To use this plugin, add story_view as a dependency in your pubspec.yaml file.

Usage

Import the package into your code

import "package:story_view/story_view.dart";

Look inside examples/example.dart on how to use this library. You can copy and paste the code into your main.dart and run to have a quick look.

Basics

Use StoryView to add stories to screen or view heirarchy. StoryView requires a list of StoryItem, each of which describes the view to be displayed on each story page, duration and so forth. This gives you the freedom to customize each page of the story.

There are shorthands provided to create common pages.

StoryItem.text is a shorthand to create a story page that displays only text.

StoryItem.pageImage creates a story item to display images with a caption.

StoryItem.inlineImage creates a story item that is intended to be displayed in a linear view hierarchy like List or Column

🍭 Both .inlineImage and pageImage support animated GIFs.

StoryItem.pageVideo creates a page story item with video media. Just provide your video url and get going.

Story controller, loaders and GIF support

While images load, it'll be a better experience to pause the stories until it's done. To achieve this effect, create a global instance of StoryController and use the shorthand StoryItem.pageImage or StoryItem.inlineImage while passing the same controller instance to it.

...
final controller = StoryController();

@override
Widget build(context) {
  List<StoryItem> storyItems = [
    StoryItem.text(...),
    StoryItem.pageImage(...),
    StoryItem.pageImage(...),
    StoryItem.pageVideo(
      ...,
      controller: controller,
    )
  ]; // your list of stories

  return StoryView(
    storyItems,
    controller: controller, // pass controller here too
    repeat: true, // should the stories be slid forever
    onStoryShow: (s) {notifyServer(s)},
    onComplete: () {},
    onVerticalSwipeComplete: (direction) {
      if (direction == Direction.down) {
        Navigator.pop(context);
      }
    } // To disable vertical swipe gestures, ignore this parameter.
      // Preferrably for inline story view.
  )
}

🍭 Now, tell your users some stories.

Docs

Find docs from here: pub.dev/story_view

카테고리

의존성

의존성 목록 4 개

소스 저장소

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