flutter_story_view 0.0.4 copy "flutter_story_view: ^0.0.4" to clipboard
flutter_story_view: ^0.0.4 copied to clipboard

Display stories like WhatsApp and Instagram. Allows video and image support both from assets and url. Also allows gestures pause, onTapNext, onTapPrevious.

flutter_story_view Pub #

WhatsApp story view package, for apps with stories like Whatsapp and Instagram.

This a Flutter widget to display stories like Whatsapp and Instagram. This can also be used inside ListView or Column. This package provide gestures like to pause, forward and go to previous story page.

Features #

🌄 Image, and video support (assets and url) both.

📍 Gesture for pause, forward and reverse page.

🌈 Animated progress indicator for each story item

🏵️ Caption for story.

Installation #

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

Usage #

Import the package into your code

import "package:flutter_story_view/flutter_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 FlutterStoryView to add stories in your Flutter App. FlutterStoryView class requires List<StoryItem> and each story item has some fields like url, duration, and type and so on. So having these, you can handily customize each single story the way you want.

  • Keep in mind : The type must be specified with each StoryItem. You can access the type String from the class StoryItemType which comes built-in with this package.

  • StoryItem Image :

final itemImage = StoryItem(
    url: "your image url/asset goes here",
    type: StoryItemType.image,
    viewers: [],
    duration: 3 // for image if duration was null it will be 3 by default.
);
  • StoryItem Video :
final itemImage = StoryItem(
    url: "your video url/asset goes here",
    type: StoryItemType.video,
    viewers: [],
    duration: 10 // for video the duration would be 30 seconds if video duration gets longer than 30 seconds.
);

For more information : visit example project inside example/example.dart.

Additional information #

This package will be improved more along the time, if you found any issue create the issue, also if you want to contribute feel free to do. I'll review your code and merge it if found useful. Thanks

Contributors #

@berkaycatak

Created & Maintained By #

@MuhammadAdnan, Youtube : @eTechViral, LinkedIn : @MuhammadAdnan , Instagram : @MuhammadAdnan, LinkedIn : @eTechViral, Instagram : @eTechViral

17
likes
130
pub points
87%
popularity

Publisher

unverified uploader

Display stories like WhatsApp and Instagram. Allows video and image support both from assets and url. Also allows gestures pause, onTapNext, onTapPrevious.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

cached_network_image, flutter, intl, video_player

More

Packages that depend on flutter_story_view