Handler: Can able to handle multiple async calls once at a time

Features

Reduce memory while multiple api calls

Getting started

import 'package:handler/handler.dart';

Usage

import 'dart:math';
import 'package:handler/handler.dart';
void main() async {
  final handler = Handler();

  // Use the rate limiter with any function
  for (var i = 0; i < 5; i++) {
    final result = await handler.execute((() async {
      // Simulate a time-consuming operation
      await Future.delayed(Duration(seconds: 2));
      return Random().nextInt(9999);
    }));
    print(result);
  }
}

Libraries

handler