Dolphin
Dolphin

Reputation: 39075

is it possible to enable macos desktop support in flutter with a complex project name

Now I want to enable my project for macos desktop support(flutter 2.x), then I do it as follows:

~/apps/flutter/bin/flutter config --enable-macos-desktop

then create folder like this:

~/apps/flutter/bin/flutter create .

but show this error message:

~/source/cruise-open on  main ⌚ 13:50:54
$ ~/apps/flutter/bin/flutter create .                                                                                                                                             ‹ruby-2.7.2›
"cruise-open" is not a valid Dart package name.

See https://dart.dev/tools/pub/pubspec#name for more information.
(base)

I know that my project name has a - make it did not as expect. but now my project already named to cruise-open, so is it possible to make my project support macos desktop? or I have to rename my project? I have tried this way:

~/source/cruise-open on  main ⌚ 11:38:58
$ ~/apps/flutter/bin/flutter create --project-name cruise-open .                                                                                                                  ‹ruby-2.7.2›
"cruise-open" is not a valid Dart package name.

See https://dart.dev/tools/pub/pubspec#name for more information.
(base)

Upvotes: 0

Views: 154

Answers (1)

eeqk
eeqk

Reputation: 3862

Try this

$ cd cruise-open
$ flutter create --project-name cruise_open .

Upvotes: 1

Related Questions