story_progress 0.0.5 copy "story_progress: ^0.0.5" to clipboard
story_progress: ^0.0.5 copied to clipboard

show horizontal progress like instagram stories.can navigate to forward and previous stories.

Story Progress #

pub package

A package provides an easy way to show horizontal progress like instagram stories in Flutter project

How to use #

import 'package:story_progress/story_progress.dart';

  var _formKey = GlobalKey<StoryProgressState>(); 
  var _play = false;

StoryProgress(
       key: _formKey,
       progressCount: 4,
       width: width,
       duration: Duration(seconds: 3),
       onStatusChanged: (value) {
       WidgetsBinding.instance.addPostFrameCallback((_) {
          switch (value) {
             case Status.next:
              //       
             break;
             case Status.previous:
              //
             break;
             case Status.completed:
              ScaffoldMessenger.of(context).showSnackBar(SnackBar(
                          content: Text('Stories completed'),
                          duration: Duration(seconds: 1),
               ));
             break;
             }
           });
       },
)

Skip and Previous story #

Use this function on onPressed event


_formKey.currentState.skip();
_formKey.currentState.previous();

Pause and Resume(start) story #

Use this function on onPressed event


  _formKey.currentState.pause();
  _formKey.currentState.resume(); //

5
likes
40
pub points
0%
popularity

Publisher

unverified uploader

show horizontal progress like instagram stories.can navigate to forward and previous stories.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on story_progress