getFile method

ReleasePackerFile? getFile(
  1. String filePath, {
  2. String? platform,
})

Implementation

ReleasePackerFile? getFile(String filePath, {String? platform}) {
  var possibleDirPath = filePath.endsWith('/') ? filePath : '$filePath/';

  var where = files.where(
      (e) => e.sourcePath == filePath || e.sourcePath == possibleDirPath);

  if (platform != null) {
    where = where.where((e) => e.matchesPlatform(platform));
  }

  return where.firstOrNull;
}