jamesblasco / flutter_preview

Flutter | Because a widget-driven development requires a widget-driven preview.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run flutter preview on other device target?

jamesblasco opened this issue · comments

Flutter supports to run it on multiple platforms: Android Simulator, iOS Simulator, Web, macOS, Windows, and Linux.
You can choose the platform but the final goal would be to use desktop or web when they became stable.

To choose the device you need to tap the button right corner of VSCode and a dialog will display a list with your available devices

Why web doesn't appear?

Web is not stable and it is available only in beta, dev and master channels.
Before changing to another branch make sure you understand the implications of using a non-stable Flutter version in production

How to enable web for my project?

  • Change to a Flutter version that supports web
    -flutter channel beta
    -flutter upgrade
  • Enable flutter web
    -flutter config --enable-web
  • Add web folder to your flutter project
    - flutter create .

Read more at https://flutter.dev/docs/get-started/web

Why macOS, Windows or Linux doesn't appear?

Flutter Desktop is not stable and it is available only in dev and master channels.
Before changing to another branch make sure you understand the implications of using a non-stable Flutter version in production

How to enable Flutter Desktop for my project?

  • Change to a Flutter version that supports desktop
    -flutter channel dev
    -flutter upgrade
  • Enable flutter macOS, Windows or Linux
    -flutter config --enable-macos-desktop
    -flutter config --enable-linux-desktop
    -flutter config --enable-windows-desktop
  • Add web folder to your flutter project
    - `flutter create .

Read more at https://flutter.dev/desktop