-
Notifications
You must be signed in to change notification settings - Fork 0
Project Structure
aiserrock edited this page Jul 8, 2026
·
1 revision
lib/
├── api/ # generated Chopper/OpenAPI client (do not edit)
├── di/ # get_it + injectable DI container
├── domain/ # plain Dart models
├── generated/ # generated LocaleKeys (do not edit)
├── navigation/ # go_router config
├── res/ # design tokens (colors, text styles, dimens)
├── service/ # injectable services (auth, animal, staff, ...)
├── ui/
│ ├── screen/ # <feature>/ folders: cubit/bloc + view + model
│ └── widget/ # shared widgets
├── util/ # helpers, DataState, bloc_ext
└── export.dart # barrel file
- api/ and generated/ are code-generated — regenerate via build_runner, never hand-edit.
-
di/ wires up
get_it+injectable; annotate injectable classes and run the generator to update it. - domain/ holds plain Dart data models, no logic tied to Flutter or services.
-
service/ contains one subfolder per domain area (e.g.
auth/,animal/,staff/), each exposing an injectable service class. - ui/screen/<feature>/ groups a screen's cubit/bloc, view, and model together per feature.
- ui/widget/ holds widgets reused across multiple screens.
-
util/ contains cross-cutting helpers such as
DataStateand bloc extension methods. - export.dart re-exports commonly used symbols as a single import barrel.