tryOrNull<T> method

T? tryOrNull<T>(
  1. List? positionalArguments, [
  2. Map<Symbol, dynamic>? namedArguments
])

Implementation

T? tryOrNull<T>(
  List<dynamic>? positionalArguments, [
  Map<Symbol, dynamic>? namedArguments,
]) {
  try {
    return Function.apply(
      this,
      positionalArguments ?? [],
      namedArguments ?? {},
    ) as T?;
  } catch (_) {
    return null;
  }
}