Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add mac os support to a flutter package project?

Tags:

macos

flutter

I have tried running the terminal command:

flutter config --enable-macos-desktop

but it gives me error:

The "--platforms" argument is not supported in package template
like image 410
Abdelrahman Tareq Avatar asked Sep 16 '25 16:09

Abdelrahman Tareq


2 Answers

for an existing project just run

flutter create --platforms=macos .

See also here some official docs from the flutter website: https://docs.flutter.dev/development/platform-integration/desktop#add-desktop-support-to-an-existing-flutter-app

like image 200
MuTe33 Avatar answered Sep 18 '25 09:09

MuTe33


I have found work around:

  1. copy mac os folder from a new natural flutter project(non-package):

  2. open terminal & run:

    cd example/macos

3.run:

pod install     

then

flutter run 
like image 23
Abdelrahman Tareq Avatar answered Sep 18 '25 10:09

Abdelrahman Tareq