50 lines
798 B
Markdown
50 lines
798 B
Markdown
# Setup
|
|
|
|
## Backend Base URL
|
|
|
|
Build-time (recommended):
|
|
|
|
```bash
|
|
flutter run --dart-define=BACKEND_BASE_URL=https://api.example.com
|
|
```
|
|
|
|
Runtime override (for future settings screens):
|
|
|
|
```dart
|
|
AppConfig.overrideBackendBaseUrl('https://staging.example.com');
|
|
```
|
|
|
|
## Run With Fake Gateway
|
|
|
|
Use fake gateway for local/offline development:
|
|
|
|
```bash
|
|
flutter run --dart-define=USE_FAKE_BACKEND=true
|
|
```
|
|
|
|
## Local Persistence Backend
|
|
|
|
Default local store:
|
|
|
|
- `shared_preferences` (stable baseline)
|
|
|
|
Optional migration path:
|
|
|
|
```bash
|
|
flutter run --dart-define=USE_HIVE_LOCAL_DB=true
|
|
```
|
|
|
|
When enabled, local app state is stored in Hive via the `LocalDataStore` adapter layer.
|
|
|
|
## Run Tests
|
|
|
|
```bash
|
|
flutter test
|
|
```
|
|
|
|
## Generate Code
|
|
|
|
```bash
|
|
dart run build_runner build --delete-conflicting-outputs
|
|
```
|