I’m really new to flutter, I want to install a plugin from pub.dev (https://pub.dev/packages/table_calendar/install)
The manual says that I need to execute below command,
flutter pub add table_calendar
But what I’ve got is
Could not find a subcommand named "add" for "flutter pub".
Run ‘flutter -h’ (or ‘flutter -h’) for available flutter
commands and options.
I have tried to search for the solution why my flutter cannot use "add" command but not found yet.
Here is my flutter doctor -v
[✓] Flutter (Channel stable, 1.22.4, on macOS 12.1 21C52 darwin-arm, locale en-TH)
• Flutter version 1.22.4 at /Users/kalvin/development/flutter
• Framework revision 1aafb3a8b9 (2 years, 8 months ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
2
Answers
Try this:
Your Flutter version is waaaay old. These commands introtuced in here: https://github.com/flutter/flutter/issues/72805
Try upgrading Flutter.