Skip to content
xinlx227-aiPublic

About

一个随便app

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Whatever — Warm meal

Android-first meal decisions. Draw What to eat (吃什么), What to cook (做什么), or Where to eat (去哪吃) options with a wheel or single-target cards and explicitly confirm to local SQLite history. Cooking supports 1–10 distinct dishes drawn one at a time and saved as one meal, including early confirmation. The independent libraries include 32 foods/drinks, 26 cooking options, and 12 restaurant brands, plus personal options and photos. Live sessions survive navigation and backgrounding, and start fresh after process termination.

Scope

Categories can be created, renamed, and filtered together within each scenario. Custom-category deletion retains its options in the fallback category. Combined filters draw once per eligible option identity. Cooking shortages offer the available count or filter adjustment. Any wheel result can be replaced in its original slot by redrawing or excluding it for the live session. Replacement checks for an alternative and waits for another explicit start. Cards supports rounds targeting one result in all three scenarios: browse the complete face-down fan, tap to select, tap again to reveal, then confirm directly or replace. Multi-target Cards remains in S09/S10; selecting it preserves the requested count and offers Wheel. Both modes preserve the shared replacement and save contracts. Cards applies its celestial palette to shared pages and remembers first-use guidance completion or skipping. Broader name recognition remains a later slice. The browser comparison under prototype/visual-directions/ is historical design material; variant A is selected. Its adjustable preview controls are not application settings.

Run and verify

Install Flutter stable and the Android SDK, accept Android licenses, and provide a booted Android emulator or connected phone. This workstation uses Flutter at D:/flutter, Android SDK at D:/SDK, and JDK at D:/JDK; other machines can use their own paths.

$env:Path = "D:\flutter\bin;D:\SDK\platform-tools;" + $env:Path
flutter pub get
flutter analyze
flutter test
flutter test integration_test/android_journey_test.dart -d emulator-5554
flutter test integration_test/library_journey_test.dart -d emulator-5554
flutter test integration_test/scenario_journey_test.dart -d emulator-5554
flutter test integration_test/category_journey_test.dart -d emulator-5554
flutter test integration_test/cooking_journey_test.dart -d emulator-5554
flutter test integration_test/replacement_journey_test.dart -d emulator-5554
flutter test integration_test/cards_journey_test.dart -d emulator-5554
flutter run -d emulator-5554

Launch the local emulator without a separate console window:

Start-Process 'D:/SDK/emulator/emulator.exe' -WindowStyle Hidden -ArgumentList '-avd','meal_app_api35'

Create an APK for phone review:

flutter build apk --release --target-platform "android-arm64,android-x64"

The APK is written to build/app/outputs/flutter-apk/app-release.apk and supports ARM64 phones and x86_64 emulators. S01 review builds use the local debug signing key; configure release signing before store distribution. Tests remove their temporary databases. Production records use the app-private whatever.sqlite database and survive process restarts.

Implementation boundaries

  • lib/domain/meal.dart: accepted identities, meal periods, and confirmation data.
  • lib/domain/meal_preferences.dart: durable mode, yesterday-filter and first-use Cards guidance preferences.
  • lib/application/meal_controller.dart: eligible selection and temporary round state; animation cannot influence probability.
  • lib/data/meal_repository.dart: SQLite schema and atomic, idempotent confirmation. Fault seams simulate rollback after a header or item write and lost acknowledgement after commit.
  • lib/presentation/: Chinese UI, responsive layout, animation, navigation, and feedback.
  • test/: real SQLite application journeys and widget interaction checks.
  • integration_test/: native Android draw-to-durable-history smoke journey.

Unconfirmed rounds and session exclusions remain in memory. Option library and Decide remember independent scenario selections during the session; Decide shares one selected meal period across scenarios. Root Back moves the Android task home; removing the task destroys its engine. SQLite schema v6 adds a durable Cards tutorial-dismissal flag while preserving the v5 category registry. Schema v5 adds a persisted category registry and atomic category rename/deletion on top of the v4 seed content, built-in memberships, and restaurant fields. Category changes preserve option identities, display edits, images, activation, preferences, and history. Built-in food/dish categories and periods remain system-maintained; restaurant periods are user-editable applicability settings, not opening hours. Library mutations serialize with confirmation and invalidate unfinished rounds only after actual durable changes. Confirmation fixes an operation ID and payload before writing; retries reuse them, preventing duplicate records after lost acknowledgements. The database stores UTC instants and the UI groups records by local calendar date.

About

一个随便app

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages