runInBackground<T, U> method

  1. @Deprecated('Use [nativeImplementations] instead')
Future<T> runInBackground<T, U>(
  1. FutureOr<T> function(
    1. U arg
    ),
  2. U arg
)

Implementation

@Deprecated('Use [nativeImplementations] instead')
Future<T> runInBackground<T, U>(
    FutureOr<T> Function(U arg) function, U arg) async {
  final compute = this.compute;
  if (compute != null) {
    return await compute(function, arg);
  }
  return await function(arg);
}