TryCallOnFunctionExt extension

Provides a safe, dynamic invocation method for any Function.

on

Methods

tryCall<T, A extends Object?>(List<A>? positionalArguments, [Map<Symbol, A>? namedArguments]) → T?

Available on Function, provided by the TryCallOnFunctionExt extension

Invokes the function dynamically, returning null if it throws an exception.