Flutter: Difference between revisions

imported>Jmarmstrong1207
No edit summary
imported>Jmarmstrong1207
Add emulator section
Line 8: Line 8:


If you prefer [[Vscode|VSCode]], you can create a [[Development environment with nix-shell|dev-shell]] with the packages "jdk", "flutter", and a preferred android sdk such as the preconfigured one "androidenv.androidPkgs_9_0.androidsdk" (mentioned in the Android wiki page). Add other packages if missing any. Or you can install Android Studio to get all the Android packages, and install Flutter.
If you prefer [[Vscode|VSCode]], you can create a [[Development environment with nix-shell|dev-shell]] with the packages "jdk", "flutter", and a preferred android sdk such as the preconfigured one "androidenv.androidPkgs_9_0.androidsdk" (mentioned in the Android wiki page). Add other packages if missing any. Or you can install Android Studio to get all the Android packages, and install Flutter.


Below is an example [[Flakes|flake.nix]] for creating a dev shell. Create following <code>flake.nix</code> in a new project directory
Below is an example [[Flakes|flake.nix]] for creating a dev shell. Create following <code>flake.nix</code> in a new project directory
Line 94: Line 93:
# flutter run
# flutter run
</syntaxhighlight>
</syntaxhighlight>
== Emulators ==
[[Android|View the Android wiki page for more info]], but you can set up emulators in Android Studio, run them from there, then target the emulator in VSCode when running your flutter code. Otherwise, you can Nixify your emulators as stated in the Android wiki page


== Packaging ==
== Packaging ==