popResult static method

void popResult(
  1. BuildContext context,
  2. Object? result
)

In case result is success, call Navigator.pop with the result, else do nothing.

Implementation

static void popResult(BuildContext context, Object? result) => Navigator.of(context).pop(result);