The goal of this repo is to have everything you need to start with flutter desktop + mobile simply by forking the project. This will no longer be necessary once flutter create
supports desktop and web.
Fork this project or click 'Use Template' to get started! :)
You need to be on the flutter master or dev channel for this project to work!
- Update Flutter
flutter channel master; flutter upgrade
-
cd mobile
-
Run
flutter build ios
||flutter build apk
The desktop support is provided by flutter-desktop-embedding
. For any issues and setup instructions please refer to the docs here.
-
cd desktop
-
Update your $PATH
export ENABLE_FLUTTER_DESKTOP=true
-
Run
flutter precache
-
Run
flutter run -d macos
||flutter run -d windows
||flutter run -d linux
Flutter for Web is provided by flutter_web
. For Issues and Setup Info refer to the docs here.
-
cd web
-
Update your $PATH
export FLUTTER_WEB=true
-
Run
flutter packages global run webdev serve
This is the core part of your app that can be shared between web, mobile and command-line versions of your app. This part cannot depend on the Flutter SDK.
Use this for constants, classes, abstract classes and utilites.
-
Run
cd core
-
Run
flutter packages pub run build_runner watch —delete-conflicting-outputs
This is the part of the app that can share everything used in the Flutter SDK. Like Models, Themes and Locale. Shared includes core.
- Run
cd shared