This comprehensive guide covers quick start commands, platform initialization, setup, commands, and compatibility for running the Flutter app on Android, iOS, Windows, and Web platforms.
# Run on Android
flutter run -d android
# Build APK
flutter build apk --release# Enable Windows support (first time only)
flutter config --enable-windows-desktop
# Run on Windows
flutter run -d windows
# Build for Windows
flutter build windows --release# Enable Web support (first time only)
flutter config --enable-web
# Run on Chrome
flutter run -d chrome
# Build for Web
flutter build web --release# Run on iOS
flutter run -d ios
# Build for iOS
flutter build ios --release- β
Flutter SDK installed (
flutter --version) - β
Backend services running (
docker-compose up -d) - β
Dependencies installed (
flutter pub get)
- β Android Studio installed
- β Android device connected OR emulator running
- β Android SDK configured
- β Visual Studio 2019+ installed
- β "Desktop development with C++" workload installed
- β Chrome/Edge/Firefox browser installed
- β macOS required
- β Xcode installed (free from Mac App Store)
- β CocoaPods installed
cd docker-compose
docker-compose ps
# All services should be "Up"curl http://localhost:3002/api/auth/health
# Should return successFor Android Emulator:
Edit lib/core/config/app_config.dart:
static const String baseApiUrl = 'http://10.0.2.2:8080';For Physical Android Device:
Edit lib/core/config/app_config.dart:
static const String baseApiUrl = 'http://YOUR_COMPUTER_IP:8080';For Windows/Web:
static const String baseApiUrl = 'http://localhost:8080';The Flutter app has been successfully initialized for Android and iOS platforms. Windows and Web support can be enabled as needed.
- Android Studio installed
- Android SDK configured
- Android device connected OR emulator running
- β
android/app/src/main/AndroidManifest.xml- Configured with required permissions - β
android/app/build.gradle.kts- Build configuration - β
android/build.gradle.kts- Project-level build configuration - β
android/gradle.properties- Gradle properties - β
android/settings.gradle.kts- Gradle settings
- β Internet - Required for API calls
- β Camera - Required for QR code scanning
- β Network State - Required for connectivity checks
- β Cleartext Traffic - Enabled for localhost development
- App Name: Library Booking
- Package Name:
com.example.library_booking_app - Min SDK: API 21 (Android 5.0 Lollipop)
- Target SDK: Latest Android version
- Kotlin: Configured for Kotlin support
- Gradle: Uses Kotlin DSL (
.ktsfiles)
flutter doctorEnsure Android toolchain shows no issues.
flutter devicesYou should see your Android device or emulator listed, for example:
sdk gphone64 arm64 (mobile) β’ emulator-5554 β’ android-arm64 β’ Android 13 (API 33)
# Run on any available Android device
flutter run -d android
# Run on specific device (use device ID from flutter devices)
flutter run -d emulator-5554
# Run in release mode
flutter run -d android --release
# Run with hot reload enabled (default)
flutter run -d android --hotDebug APK:
flutter build apk --debug
# Output: build/app/outputs/flutter-apk/app-debug.apkRelease APK:
flutter build apk --release
# Output: build/app/outputs/flutter-apk/app-release.apkSplit APKs (by ABI):
flutter build apk --split-per-abi
# Outputs separate APKs for arm64-v8a, armeabi-v7a, x86_64App Bundle (for Play Store):
flutter build appbundle --release
# Output: build/app/outputs/bundle/release/app-release.aab# After building, install on connected device
flutter install
# Or manually install
adb install build/app/outputs/flutter-apk/app-release.apk- Minimum SDK: API 21 (Android 5.0)
- Target SDK: Latest (configured in
android/app/build.gradle.kts) - Permissions: Camera, Internet, Network State (configured in
AndroidManifest.xml) - Localhost Access:
- Android Emulator: Use
10.0.2.2instead oflocalhostin API config - Physical Android Device: Use your computer's IP address (e.g.,
192.168.1.100) - Update
lib/core/config/app_config.dart:// For Android emulator static const String baseApiUrl = 'http://10.0.2.2:8080'; // For physical device (replace with your IP) static const String baseApiUrl = 'http://192.168.1.100:8080';
- Android Emulator: Use
-
Update Android SDK (if needed):
# Flutter requires Android SDK 36 # Update via Android Studio SDK Manager or command line
-
Test on Android Device/Emulator:
flutter run -d android
- macOS required
- Xcode installed (free from Mac App Store)
- CocoaPods installed
- β
ios/Runner/Info.plist- Configured with required permissions - β
ios/Runner/AppDelegate.swift- App delegate - β
ios/Runner.xcodeproj- Xcode project - β
ios/Runner.xcworkspace- Xcode workspace - β
ios/Podfile- CocoaPods dependencies
- β Camera Usage Description - "This app needs access to camera to scan QR codes for booking check-in."
- β Photo Library Usage Description - "This app needs access to photo library to save QR codes."
- β Location Usage Description - "This app may use location to show nearby library resources."
- β App Transport Security - Configured to allow localhost connections
- App Name: Library Booking
- Bundle Identifier: Uses default (can be customized in Xcode)
- Deployment Target: iOS 12.0+ (Flutter default)
- Swift: Uses Swift for native code
- CocoaPods: Required for iOS dependencies
open ios/Runner.xcworkspace- Open Xcode project
- Select Runner target
- Go to "Signing & Capabilities"
- Select your development team
- Xcode will automatically manage provisioning profiles
cd ios
pod install
cd ..flutter doctorEnsure iOS toolchain shows no issues.
flutter devices# Run on iOS Simulator/Device
flutter run -d ios
# Run on specific device
flutter run -d <device-id>
# Run in release mode
flutter run -d ios --releaseflutter build ios --release
# Then open Xcode to archive and upload to App Store- Windows 10/11
- Visual Studio 2019 or later (with C++ desktop development workload)
- Flutter SDK with Windows desktop support enabled
flutter config --enable-windows-desktopflutter doctorEnsure Windows toolchain shows no issues. You may need to install Visual Studio if not already installed.
flutter devicesYou should see:
Windows (desktop) β’ windows β’ windows-x64 β’ Microsoft Windows [Version ...]
# Run on Windows desktop
flutter run -d windows
# Run in release mode
flutter run -d windows --release
# Run with specific window size
flutter run -d windows --window-size=800,600# Debug build
flutter build windows --debug
# Release build
flutter build windows --release
# Output: build/windows/runner/Release/- Architecture: x64 (64-bit) only
- Visual Studio: Required for building (free Community edition works)
- Dependencies: Some features may have limitations (see Platform Compatibility section)
- Localhost Access:
localhostworks normally on Windows
- Chrome, Edge, or Firefox browser
- Flutter SDK with Web support enabled
flutter config --enable-webflutter doctorflutter devicesYou should see:
Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome ...
Edge (web) β’ edge β’ web-javascript β’ Microsoft Edge ...
# Run on Chrome (default)
flutter run -d chrome
# Run on Edge
flutter run -d edge
# Run on Firefox
flutter run -d firefox
# Run on Chrome with specific port
flutter run -d chrome --web-port=8080
# Run with specific hostname
flutter run -d chrome --web-hostname=localhost# Debug build
flutter build web --debug
# Release build
flutter build web --release
# Output: build/web/
# Build with base href (for deployment)
flutter build web --release --base-href=/library-booking/# After building, serve the web build
cd build/web
python -m http.server 8000
# Or use any static file server- Browser Support: Chrome, Edge, Firefox, Safari
- Performance: Web builds may be slower than native
- Features: Some features have limitations (see Platform Compatibility section)
- Localhost Access:
localhostworks normally on Web - CORS: Ensure backend allows CORS for web requests
| Platform | Status | Notes |
|---|---|---|
| Android | β Fully Supported | All features work |
| iOS | β Fully Supported | All features work (macOS required) |
| Web | Some features limited (see below) | |
| Windows | Some features limited (see below) | |
| Linux | May work with limitations | |
| macOS | May work with limitations |
| Dependency | Android | iOS | Web | Windows | Notes |
|---|---|---|---|---|---|
provider |
β | β | β | β | State management |
http |
β | β | β | β | HTTP client |
web_socket_channel |
β | β | β | β | WebSocket support |
connectivity_plus |
β | β | β | β | Network connectivity |
shared_preferences |
β | β | β | β | Local storage |
intl |
β | β | β | β | Internationalization |
flutter_svg |
β | β | β | β | SVG rendering |
fl_chart |
β | β | β | β | Charts and graphs |
url_launcher |
β | β | β | β | URL launching |
share_plus |
β | β | β | β | Share functionality |
| Dependency | Android | iOS | Web | Windows | Notes |
|---|---|---|---|---|---|
flutter_secure_storage |
β | β | β | Web uses localStorage fallback | |
qr_flutter |
β | β | β | β | QR code generation works everywhere |
qr_code_scanner |
β | β | β No | β No | Camera access required |
image_picker |
β | β | Web: file picker only | ||
permission_handler |
β | β | Web: limited permissions |
- Web: β Not available (no camera access)
- Windows: β Not available (no camera access)
- Workaround: Use manual QR code entry (implemented in app)
- Web: β No native camera access
- Windows:
β οΈ Limited (depends on device) - Impact: QR code scanning feature unavailable
- Web:
β οΈ Uses localStorage (less secure than native) - Windows: β Works (uses Windows Credential Manager)
- Impact: Tokens stored less securely on web
- Web:
β οΈ File picker only (no camera) - Windows:
β οΈ File picker only (no camera) - Impact: Can't take photos, only select files
- Web:
β οΈ Limited permissions (browser-based) - Windows:
β οΈ Limited permissions - Impact: Some permissions may not work as expected
- Authentication: Login, Register, Logout
- Resource Browsing: View, search, filter resources
- Booking Management: Create, view, cancel bookings
- QR Code Display: Generate and display QR codes
- Real-time Updates: WebSocket/polling (works on all platforms)
- Notifications: View and manage notifications
- Analytics: View charts and statistics
- User Management: (Admin) Manage users
- Policy Management: (Admin) Manage policies
- Resource Management: (Admin) CRUD operations
QR Code Scanning:
- The app includes a manual QR code entry option
- Users can type QR code data instead of scanning
Secure Storage:
- Uses browser localStorage (less secure)
- Consider using HTTPS in production
Camera Access:
- Not available on web
- QR code scanning feature disabled on web
QR Code Scanning:
- Not available (unless device has camera)
- Use manual QR code entry
Camera Access:
- Limited to devices with cameras
- May not work on all Windows devices
- β QR Code Scanner (camera access required)
- β Workaround: Manual QR code entry available
β οΈ Secure Storage (Web): Uses localStorage (less secure)β οΈ Image Picker (Web/Windows): File picker only (no camera)
- β Authentication (Login/Register)
- β Resource Browsing
- β Booking Management
- β QR Code Display (generation)
- β Real-time Updates
- β All Admin/Staff features
"No devices found"
# Check available devices
flutter devices
# For Android: Check ADB
adb devices
# Restart ADB (Android)
adb kill-server
adb start-server"Backend connection failed"
- Verify backend is running:
docker-compose ps - Check API URL in
app_config.dart - For Android emulator, use
10.0.2.2instead oflocalhost
"Platform not enabled"
# Enable the platform
flutter config --enable-windows-desktop # For Windows
flutter config --enable-web # For WebIssue: "No devices found"
# Check ADB connection
adb devices
# Restart ADB
adb kill-server
adb start-serverIssue: "SDK version mismatch"
# Update Android SDK
flutter doctor --android-licensesIssue: SDK Version
- Update Android SDK to version 36
- Run
flutter cleanthenflutter pub get - Check
android/app/build.gradle.ktsconfiguration
Issue: Gradle Sync
flutter clean
flutter pub getIssue: Build Errors
- Check
android/app/build.gradle.ktsconfiguration - Verify Android SDK version
Issue: CocoaPods
cd ios
pod install
cd ..Issue: Signing
- Configure signing in Xcode
- Select development team in "Signing & Capabilities"
Issue: Build Errors
- Check Xcode project settings
- Verify CocoaPods dependencies are installed
Issue: "Windows desktop not enabled"
flutter config --enable-windows-desktop
flutter create --platforms=windows .Issue: "Visual Studio not found"
- Install Visual Studio 2019 or later
- Install "Desktop development with C++" workload
Issue: "Web not enabled"
flutter config --enable-webIssue: "CORS errors"
- Configure backend to allow CORS
- Or use proxy during development
Issue: "Features not working on web"
- Check Platform Compatibility section
- Some features are intentionally disabled on web
- Android Emulator: Best for testing mobile features
- Chrome (Web): Fastest for UI development
- Windows Desktop: Good for desktop testing
- Android: β Full feature support
- iOS: β Full feature support
- Web:
β οΈ Limited features (no QR scanning) - Windows:
β οΈ Limited features (no QR scanning)
- Test on Android for full feature coverage
- Test on Web for cross-platform compatibility
- Test on Windows if targeting desktop users
# Android
flutter run -d android
# iOS
flutter run -d ios
# Windows
flutter run -d windows
# Web (Chrome)
flutter run -d chrome# Android APK
flutter build apk --release
# Android App Bundle
flutter build appbundle --release
# iOS
flutter build ios --release
# Windows
flutter build windows --release
# Web
flutter build web --releaseflutter devicesflutter doctor- Android SDK: You may need to update your Android SDK to version 36 as required by Flutter
- iOS Development: Requires macOS and Xcode (free from Mac App Store)
- Signing: Both Android and iOS require proper code signing for release builds
- Permissions: Camera permission is required for QR code scanning feature
- Network: App is configured to allow cleartext traffic for localhost development
- Windows: Requires Visual Studio with C++ desktop development workload
- Web: Some features have limitations due to browser security restrictions
- Flutter Platform Support
- Flutter Android Setup
- Flutter iOS Setup
- Flutter Web Support
- Flutter Windows Support
- Android App Signing
- iOS App Distribution
Last Updated: December 2025