once<T> method

Future<T> once<T>([
  1. String? type
])

Same as on but only running once, by returning a Future.

Implementation

Future<T> once<T>([String? type]) => on<T>(type).first;