prepareInput static method

Future<String> prepareInput(
  1. MergeInput input
)

Process a MergeInput and return a valid file path or blob URL.

Implementation

static Future<String> prepareInput(MergeInput input) async {
  switch (input) {
    case PathMergeInput(:final path):
      return path;
    case BytesMergeInput(:final bytes):
      return createBlobUrl(bytes);
    case UrlMergeInput(:final url):
      final bytes = await getUrlBytes(url);
      return createBlobUrl(bytes);
  }
}