https://github.com/linuxmobile/flutter-flake-template
https://github.com/linuxmobile/flutter-flake-template
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/linuxmobile/flutter-flake-template
- Owner: linuxmobile
- Created: 2025-05-18T22:08:25.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-05-18T22:08:46.000Z (9 months ago)
- Last Synced: 2025-08-22T04:55:55.822Z (5 months ago)
- Language: Nix
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flutter Development Environment
A simple Nix setup for Flutter development with Android testing options.
## Key Features
- Flutter and Dart SDK development environment
- Android SDK with build tools
- Two options for testing Android apps:
- Standard Android Emulator (using `default.nix`)
- Waydroid for native Wayland support (using `flake.nix`)
## Quick Start
### Method 1: Android Emulator (recommended for most cases)
```bash
# Build and run the emulator
nix-build default.nix
./result/bin/run-test-emulator
```
### Method 2: Flutter + Waydroid (for Wayland environments)
```bash
# Setup in NixOS configuration.nix
virtualisation.waydroid.enable = true;
# Enter development environment
nix develop
# Start Waydroid
sudo waydroid init -s GAPPS -f
sudo systemctl start waydroid-container
waydroid session start
waydroid show-full-ui
```
## Flutter Workflow
```bash
# Create new project
flutter create my_app
cd my_app
# Build your app
flutter build apk
# Install on Android Emulator
adb install build/app/outputs/flutter-apk/app-release.apk
# Or install on Waydroid
waydroid app install build/app/outputs/flutter-apk/app-release.apk
```
## Troubleshooting
### Android Emulator Issues
If you have problems with the emulator:
- Try with `JDK8` instead of `JDK17` if the AVD manager fails
- Ensure KVM is enabled: `sudo modprobe kvm`
- Check virtualization is enabled in BIOS/UEFI
### Waydroid Issues
For GPU performance problems:
```bash
echo "ro.hardware.gralloc=default
ro.hardware.egl=swiftshader" | sudo tee -a /var/lib/waydroid/waydroid_base.prop
```