asFileName property

String get asFileName

Returns this release as a compatible file name.

Implementation

String get asFileName {
  var platformStr = platform ?? '';
  if (platformStr.isNotEmpty) {
    platformStr = '-$platformStr';
  }
  var path = '$name-$version$platformStr';
  path = path.replaceAll(RegExp(r'[^\w.-]+'), '');
  return path;
}