packageName method
Implementation
@override
String packageName(String package) {
final index = int.tryParse(package);
final isIndex = index != null;
if (isIndex && index >= Packages.values.length) {
throw const NotExistsResource(cause: 'Unknown Package Index');
}
final packageName =
isIndex ? InputConverter.enumToString(Packages.values[index]) : package;
return packageName;
}