Skip to content

iReact2Code/flutter-app

Repository files navigation

my_flutter_store

Minimal e-commerce Flutter app with Riverpod state management, GoRouter routing, and cart persistence.

Run on Android (VS Code tasks)

Use the built-in tasks for a one-click flow:

  1. Build debug APK

    • VS Code → Terminal → Run Task… → "Flutter: Build Debug APK"
  2. Install + launch on emulator/device

    • VS Code → Terminal → Run Task… → "Android: Install+Launch Debug APK"
  3. One step (build + install + launch)

    • VS Code → Terminal → Run Task… → "Android: Build+Install+Launch (Debug)"

The install+launch task calls scripts/android-install-launch.ps1, which:

  • Ensures ANDROID_HOME and ANDROID_SDK_ROOT
  • Starts the Medium_Phone AVD if none is connected
  • Waits for a device, installs the APK, and launches the app package com.example.my_flutter_store

Troubleshooting

  • Ensure you have an AVD named Medium_Phone or adjust the script at scripts/android-install-launch.ps1.
  • If APK not found, run the build task first.
  • To speed up Gradle: add org.gradle.caching=true in android/gradle.properties.
  • If you see network timeouts on Gradle downloads, re-run; the cache will be populated.

Useful Links

Environment configs

This app reads configuration via compile-time defines using AppConfig.current.

  • Files in configs/ (dev.json, stage.json, prod.json) define values like API_BASE_URL.
  • Leave API_BASE_URL empty to use the in-memory products repository.

Examples:

flutter run --dart-define-from-file=configs/dev.json
flutter build apk --debug --dart-define-from-file=configs/dev.json

CI

GitHub Actions workflow in .github/workflows/ci.yml runs:

  • flutter analyze
  • flutter test
  • build debug APK (pushes only) and uploads as an artifact

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published