Giter Club home page Giter Club logo

flutter-story-view's Introduction

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

flutter-story-view's People

Contributors

adnankhan45 avatar berkaycatak avatar hct-berkay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.