1

I installed Flutter for Mac OS which already includes Dart. However, when I try to run a simple hello world Dart program from Terminal via dart hello.dart I get the typical command not found error. I do not know where Flutter installs the Dart SDK for my .bash_profile. What is the proper way to fix this?

Hahnemann
  • 4,378
  • 6
  • 40
  • 64

3 Answers3

5

Flutter indeed comes with a dart sdk. But it's not made to be used outside. It's specifically edited for flutter (some stuff removed, other added).

If you want to use dart on it's own, you still need to install dart sdk.

Rémi Rousselet
  • 256,336
  • 79
  • 519
  • 432
1

To run a Dart program from Mac OS Terminal, make sure you have Dart SDK installed on your macOS using command brew info dart . If not , then follow Dart SDK installation Dart install/setup on Mac/OSX

Avinder Singh
  • 71
  • 1
  • 4
0

One option to use Dart outside Flutter setup: https://dart.dev/tutorials/server/get-started

ansd the secondoption in the web-browser: https://dartpad.dev/

boldnik
  • 2,547
  • 2
  • 27
  • 32