Sync Once | Coderz Product

sync_once

Last updated:

0 purchases

sync_once Image
sync_once Images

Free

Languages

Categories

Add to Cart

Description:

sync once

sync_once #
The function will be called only once.
The package inspired by sync.Once in Go Language.
Usage #
A simple usage example:
import 'package:sync_once/sync_once.dart';

void main() async {
final once = SyncOnce();

Future<void> onceBody() async {
await once(() async {
print("Only once");
});
}

// call 3 times
await Future.wait([
onceBody(),
onceBody(),
onceBody(),
]);
}

// => Only once
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.