FunctionError.fromException constructor

FunctionError.fromException(
  1. PlatformException e
)

Obtains the result code of an exception.

Implementation

factory FunctionError.fromException(PlatformException e) {
  return FunctionError(e.message ?? '', int.parse(e.code));
}