addPackage method
Implementation
@override
Future<Either<Failure, Unit>> addPackage(String packageName) async {
try {
final isDev = isDevPackageType(packageName);
await run('dart pub add $packageName ${isDev ? '-d' : ''}');
return const Right(unit);
} on NotExistsResource catch (e) {
return Left(e);
} catch (e) {
return Left(UnknownFailure(cause: e.toString()));
}
}