mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
16 lines
480 B
Dart
16 lines
480 B
Dart
import 'dart:async';
|
|
import 'package:np_common/object_util.dart';
|
|
|
|
extension ObjectExtension<T> on T {
|
|
/// Deprecated, use [also]
|
|
T apply(void Function(T obj) fn) => also(fn);
|
|
|
|
/// Deprecated, use [alsoFuture]
|
|
Future<T> applyFuture(FutureOr<void> Function(T obj) fn) => alsoFuture(fn);
|
|
|
|
/// Deprecated, use [let]
|
|
U run<U>(U Function(T obj) fn) => let(fn);
|
|
|
|
/// Deprecated, use [letFuture]
|
|
Future<U> runFuture<U>(FutureOr<U> Function(T obj) fn) => letFuture(fn);
|
|
}
|