map method

  1. @override
PFormFile map(
  1. UploadedFile source
)

Maps a source object to the target type

source - The source object to map

Implementation

@override
PFormFile map(UploadedFile source) {
  return PFormFile(
    source.name,
    source.contentType,
    Stream.fromFuture(
      source.readAsBytes(),
    ),
  );
}