- Notifications
You must be signed in to change notification settings - Fork0
Rexcrazy804/flutter-nix-android-template
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a simple nix flake template that aims to provide a simple barebonesworking flutter template that comes with the androidSdk. Everything else I foundacross github simply weren't minimal enough to my liking.
Feel free to contribute or raise issues that may arise when using this template.Have fun :D
The following will yeild a directory named my_new_project populated with the template
nix flake new my_new_project -t github:Rexcrazy804/flutter-nix-android-templatecd my_new_projectnix develop
Before we create the virtual device I recommend enabling kvm support by enabling the respectivekvm kernelmodule for your specific CPU. with the following nix option
boot.kernelModules=["kvm-intel"];# "kvm-amd" for amd cpus
Next add your user to the kvm group with like follows
users.users.rexies.extraGroups=["kvm"];# replace rexies with your username
Once that is done cd back into the directory you have just created for theflutter project and load the devShell usingnix develop
(I HIGHLY recommendlooking intonix-direnv) and execute thefollowing commands
avdmanager create avd -ntest -k"system-images;android-35;google_apis_playstore_ps16k;x86_64"# you may run the above command without the -k "...." part to get the list of available platformsflutter emulators --launchtestflutter run -d sdk# don't forget flutter pub get if required
If you'd prefer wireless debugging on your android device you may enable adb as follows
programs.adb.enable=true;users.users.rexies.extraGroups=["adbusers"];
then pairing step would require the following comands
adb pair<deviceIP>:<paring-port><pairing code>adb connect<deviceIP>:<connection-port>
About
A simple and minimal flake.nix template for flutter + androidSdk
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.