{"id":16989088,"url":"https://github.com/blackmann/story_view","last_synced_at":"2025-04-08T02:42:42.219Z","repository":{"id":34958530,"uuid":"193239144","full_name":"blackmann/story_view","owner":"blackmann","description":"Story view for apps with stories.","archived":false,"fork":false,"pushed_at":"2024-08-16T18:41:19.000Z","size":425,"stargazers_count":452,"open_issues_count":65,"forks_count":373,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-01T01:42:28.979Z","etag":null,"topics":["andriod","dart","flutter","ios"],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blackmann.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-22T13:50:16.000Z","updated_at":"2025-03-31T11:08:07.000Z","dependencies_parsed_at":"2024-02-18T14:25:26.448Z","dependency_job_id":"53f9da33-ad5c-48a9-881c-06c1ec7fe018","html_url":"https://github.com/blackmann/story_view","commit_stats":{"total_commits":79,"total_committers":12,"mean_commits":6.583333333333333,"dds":"0.36708860759493667","last_synced_commit":"ee8512241ed1a7bf5113b086fe3e3eb620cd87cb"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Fstory_view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Fstory_view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Fstory_view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackmann%2Fstory_view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackmann","download_url":"https://codeload.github.com/blackmann/story_view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767232,"owners_count":20992538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["andriod","dart","flutter","ios"],"created_at":"2024-10-14T03:05:23.532Z","updated_at":"2025-04-08T02:42:42.194Z","avatar_url":"https://github.com/blackmann.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# story_view [![Pub](https://img.shields.io/pub/v/story_view.svg)](https://pub.dev/packages/story_view)\n\nStory view for apps with stories.\n\n![story_view](assets/story_view.png)\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"https://i.ibb.co/Q8Wtw62/Screenshot-1584263003.png\" width=200 /\u003e\n  \u003cimg src=\"https://i.ibb.co/bz0R9bd/Screenshot-1584263008.png\" width=200 /\u003e\n  \u003cimg src=\"https://i.ibb.co/NrLSbZv/Screenshot-1584263018.png\" width=200 /\u003e\n\u003c/p\u003e\n\n🍟 Watch video demo here: [story_view demo](https://youtu.be/yHAVCsWEKQE)\n\n👨‍🚀 Demo project here: [storyexample](https://github.com/blackmann/storyexample.git)\n\nThis a Flutter widget to display stories just like Whatsapp and Instagram. Can also be used\ninline/inside ListView or Column just like Google News app. Comes with gestures\nto pause, forward and go to previous page.\n\n# Features\n\n🕹 Still image, GIF and video support (with caching enabled)\n\n📍 Gesture for pause, rewind and forward\n\n⚜️ Caption for each story item\n\n🎈 Animated progress indicator for each story item\n\n📱 Fullscreen or inline\n\nAnd useful callback to perform meta functionalities including vertical swipe gestures.\n\n# Installation\n\nTo use this plugin, add `story_view` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).\n\n# Usage\n\nImport the package into your code\n\n```dart\nimport \"package:story_view/story_view.dart\";\n```\n\nLook inside `examples/example.dart` on how to use this library. You can copy\nand paste the code into your `main.dart` and run to have a quick look.\n\n## Basics\n\nUse [`StoryView`](https://pub.dev/documentation/story_view/latest/story_view/StoryView-class.html) to add stories to screen or view heirarchy. `StoryView` requires a list of [`StoryItem`](https://pub.dev/documentation/story_view/latest/story_view/StoryItem-class.html), 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.\n\nThere are shorthands provided to create common pages.\n\n`StoryItem.text` is a shorthand to create a story page that displays only text.\n\n`StoryItem.pageImage` creates a story item to display images with a caption.\n\n`StoryItem.inlineImage` creates a story item that is intended to be displayed in a linear view hierarchy like `List`\nor `Column`\n\n\u003e 🍭 Both `.inlineImage` and `pageImage` support animated GIFs.\n\n`StoryItem.pageVideo` creates a page story item with video media. Just provide your video url and get going.\n\n### Story controller, loaders and GIF support\n\nWhile 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`](https://pub.dev/documentation/story_view/latest/story_controller/StoryController-class.html) and use the shorthand `StoryItem.pageImage` or `StoryItem.inlineImage` while passing the same controller instance to it.\n\n```dart\n...\nfinal controller = StoryController();\n\n@override\nWidget build(context) {\n  List\u003cStoryItem\u003e storyItems = [\n    StoryItem.text(...),\n    StoryItem.pageImage(...),\n    StoryItem.pageImage(...),\n    StoryItem.pageVideo(\n      ...,\n      controller: controller,\n    )\n  ]; // your list of stories\n\n  return StoryView(\n    storyItems,\n    controller: controller, // pass controller here too\n    repeat: true, // should the stories be slid forever\n    onStoryShow: (s) {notifyServer(s)},\n    onComplete: () {},\n    onVerticalSwipeComplete: (direction) {\n      if (direction == Direction.down) {\n        Navigator.pop(context);\n      }\n    } // To disable vertical swipe gestures, ignore this parameter.\n      // Preferrably for inline story view.\n  )\n}\n```\n\n🍭 Now, tell your users some stories.\n\n## Docs\n\nFind docs from here: [pub.dev/story_view](https://pub.dev/documentation/story_view/latest/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackmann%2Fstory_view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackmann%2Fstory_view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackmann%2Fstory_view/lists"}