also method

FutureOr<T?> also(
  1. void consumer(
    1. T? input
    )
)

Implementation

FutureOr<T?> also(void consumer(T? input)) {
  final self = this;

  if (self is Future<T?>) {
    return self.then((resolved) {
      consumer(resolved);
      return resolved;
    });
  } else {
    consumer(self);
    return self;
  }
}