map<TR> method Null safety

TR map<TR>(
  1. {required ResultMapper<TR> completed,
  2. required FailedResultMapper<TR> failed}

Pattern match the result

completed is called if result is completed failed is called with error and stackTrace if result is failed


TR map<TR>({
  required ResultMapper<TR> completed,
  required FailedResultMapper<TR> failed,
}) =>
    unsafeMapOr<Never, TR>(
      completedResult: completed,
      failedResult: failed,