heavylist 0.1.1 copy "heavylist: ^0.1.1" to clipboard
heavylist: ^0.1.1 copied to clipboard

An asynchronous or delayed loop with resume and pause capabilities.Control how fast or slow loop progresses

heavylist #

An asynchronous or delayed loop

Getting Started #

A asynchronous,or delayed loop #

HeavyList<int> abc = new HeavyList<int>([1, 2, 3]);
  abc.loop(new Duration(seconds: 1), (List<int> origin) {
    print(origin);
  }, (int item, Function resume) {
    //simulating an asynchronous call
    new Timer(new Duration(seconds: 1), () {
      print(item);
      //move to next item
      resume();
    });
  });

A delayed loop #

HeavyList<int> abc = new HeavyList<int>([1, 2, 3]);
  abc.loop(new Duration(seconds: 1), (List<int> origin) {
    print(origin);
  }, (int item, Function resume) {
      print(item);
      //move to next item
      resume();
  });

Methods #

Method Description
addItemAt(dynamic item,int index) Add item at a specific index
addItem(item) Add item at the end of the list
addItemLoop(item) Add item at the end of the list and restart loop if completed
void removeItem(item) Remove Specifice Item
empty() Clear list
stop() Suspend loop
List<T> pause() Pause loop
resume() Resume loop
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

An asynchronous or delayed loop with resume and pause capabilities.Control how fast or slow loop progresses

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on heavylist