lil_auto_increment 1.0.0 icon indicating copy to clipboard operation
lil_auto_increment: ^1.0.0 copied to clipboard

The library for creating generator function that does auto increment value

lil_guid #

pub package

The library for creating generator function that does auto increment value.

Installation #

Add on pubspec.yml:

dependencies:
  lil_auto_increment: ... // latest package version

Usage #

A simple usage example:

import 'dart:developer';

import 'package:lil_auto_increment/lil_auto_increment.dart';

void main() {
  final Id nextId1 = autoIncrement();
  final Id nextId2 = autoIncrement();

  for (int i = 0; i < 5; i++) {
    log(nextId1().toString(), name: 'nextId1'); // 1..5
  }
  for (int i = 0; i < 10; i++) {
    log(nextId2().toString(), name: 'nextId2'); // 1..10
  }
  for (int i = 0; i < 5; i++) {
    log(nextId1().toString(), name: 'nextId1'); // 5..10
  }
}

Example #

The Example is in the corresponding folder

1
likes
140
pub points
44%
popularity

Publisher

unverified uploader

The library for creating generator function that does auto increment value

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

More

Packages that depend on lil_auto_increment