Reputation: 183
Dart documentation says as below.
Flutter note: If you’re using the Flutter SDK, don’t use the pub command directly. Instead use the flutter pub command
Why? Is it because the version could be different?
Upvotes: 0
Views: 44
Reputation: 31219
Because flutter pub
does more than just pub
. You can find the source code for the command here in Flutter:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/dart/pub.dart
An example of the difference would be the following comment:
/// Represents Flutter-specific data that is added to the `PUB_ENVIRONMENT`
/// environment variable and allows understanding the type of requests made to
/// the package site on Flutter's behalf.
Upvotes: 1