mapAsync method

  1. @override
Future<PFormFile> mapAsync(
  1. UploadedFile source
)

Asynchronously maps a source object to the target type

source - The source object to map

Implementation

@override
Future<PFormFile> mapAsync(UploadedFile source) async {
  return PFormFile(
    source.name,
    source.contentType,
    await source.readAsBytes(),
  );
}