How sanghmitra278/flutter_baghbani_survey_app works
1. Project type and runtime
- This is a Flutter mobile app called Baghbani Survey, so the core application runs in the Dart/Flutter runtime and is packaged through Android and iOS native shells.
2. Entry and app startup
- The main entry point is lib/main.dart.
- A lib/splash.dart screen exists, so the startup flow likely begins with a splash/landing screen before navigating into the main app experience.
3. Platform wrappers
- android/ and ios/ contain the generated native host apps and launcher configuration.
- MainActivity.kt and AppDelegate.swift are thin platform bridges; the app’s real UI and logic live in lib/.
4. Primary presentation layer
- lib/basic/ contains most of the app screens: dashboard.dart, form_page.dart, and a sequence of pages like second_page.dart through thirteen_page.dart.
- This suggests a multi-step survey or workflow-driven UI, where the dashboard or form screen routes into several feature pages.
5. Reusable widgets and UI primitives
- lib/widgets/ holds shared components such as:
- orchard_card.dart
- orchard_spinner.dart
- lib/basic/custom_dropdown.dart, folding_cell.dart, table_cell.dart, and my_widget.dart are additional reusable UI building blocks.
- These are the main presentation components that multiple screens likely compose.
6. Domain models
- lib/models/ defines structured data objects:
- division_model.dart
- district_model.dart
- sub_division_model.dart
- block_model.dart
- village_model.dart
- The naming shows a geographic hierarchy, which is central to the app’s data selection and survey context.
7. Data/service layer
- lib/services/get/district_block_service.dart is the only explicit service file.
- This is the boundary where UI pages likely obtain district/block-related data, keeping retrieval logic out of widgets.
- The presence of get/ in the path suggests a service namespace or possibly a GetX-style organization, but the architectural point is that data access is separated from screens.
8. Configuration and shared constants
- lib/constants/app_constants.dart centralizes app-wide values.
- This typically supports screen titles, API endpoints, labels, or fixed options used by the forms and dropdowns.
9. Assets
- assets/images/ holds static visual resources used by the Flutter UI.
- These likely support splash branding, dashboard visuals, or survey-related icons/cards.
10. Expected data flow
- The likely flow is: app start → splash → dashboard/form → selection widgets/dropdowns → service fetches district/block hierarchy → models hold the structured data → UI pages render survey steps.
- The reusable widgets sit between the pages and the models/services, acting as the composition layer.
11. Architecture boundary summary
- The repo is organized as a fairly standard Flutter app with:
- platform shell (android/, ios/)
- presentation/UI (lib/basic, lib/widgets, lib/splash.dart)
- data models (lib/models)
- service/data access (lib/services)
- shared config (lib/constants)
- There is no obvious separate backend in this repository; any remote data access would be encapsulated inside the Flutter service layer.
12. Testing and tooling
- analysis_options.yaml indicates Flutter/Dart static analysis is enabled.
- ios/RunnerTests exists, but there are no visible Dart test files in the tree, so automated app logic testing appears minimal from the repository structure alone.
Main entry points: form_page.dart Form page · dashboard.dart Dashboard · splash.dart Splash · main.dart Main app
Components 23
Platform shells
Native Android and iOS wrappers around the Flutter app.
- Android shell · Android launcher and embedding layer for the Flutter app.
android/app/src/main/kotlin/com/example/seed_development/MainActivity.kt - iOS shell · iOS launcher and embedding layer for the Flutter app.
ios/Runner/AppDelegate.swift
Flutter UI
Startup screen and workflow pages composing the survey experience.
- Main app · Application entry point and top-level bootstrap.
lib/main.dart - Splash · Initial landing screen before the main workflow.
lib/splash.dart - Dashboard · Primary landing screen for the survey flow.
lib/basic/dashboard.dart - Form page · Core survey form and navigation hub.
lib/basic/form_page.dart - Second page · One step in the multi-page survey flow.
lib/basic/second_page.dart - Third page · One step in the multi-page survey flow.
lib/basic/third_page.dart - Fourth page · One step in the multi-page survey flow.
lib/basic/fourth_page.dart - Fifth page · One step in the multi-page survey flow.
lib/basic/fifth_page.dart - Sixth page · One step in the multi-page survey flow.
lib/basic/sixth_page.dart - Seventh page · One step in the multi-page survey flow.
lib/basic/seven_page.dart - Eighth page · One step in the multi-page survey flow.
lib/basic/eight_page.dart - Ninth page · One step in the multi-page survey flow.
lib/basic/ninth_page.dart - Tenth page · One step in the multi-page survey flow.
lib/basic/tenth_page.dart - Eleventh page · One step in the multi-page survey flow.
lib/basic/eleventh_page.dart - Twelfth page · One step in the multi-page survey flow.
lib/basic/twelve_page.dart - Thirteenth page · Final visible step in the survey sequence.
lib/basic/thirteen_page.dart - Shared widgets · Reusable cards, spinners, dropdowns, and table cells.
Domain & data
Models, services, and shared constants used by the UI.
- App constants · Shared app-wide values used across screens.
lib/constants/app_constants.dart - District service · Fetches district and block hierarchy data for the UI.
lib/services/get/district_block_service.dart - Location models · Structured geographic entities used by forms and selectors.
Assets
Static visual resources bundled with the app.
- Image assets · Bundled images used by splash, dashboard, and cards.
assets/images
Connections 25
- Main app → Splash: starts at · App bootstrap opens the splash screen first.
- Splash → Dashboard: enters · Splash transitions into the main dashboard.
- Dashboard → Form page: opens · Primary navigation continues into the survey form.
- Form page → Second page: routes to · Form workflow advances to the next step.
- Second page → Third page: continues · Survey pages progress sequentially.
- Third page → Fourth page: continues · Survey pages progress sequentially.
- Fourth page → Fifth page: continues · Survey pages progress sequentially.
- Fifth page → Sixth page: continues · Survey pages progress sequentially.
- Sixth page → Seventh page: continues · Survey pages progress sequentially.
- Seventh page → Eighth page: continues · Survey pages progress sequentially.
- Eighth page → Ninth page: continues · Survey pages progress sequentially.
- Ninth page → Tenth page: continues · Survey pages progress sequentially.
- Tenth page → Eleventh page: continues · Survey pages progress sequentially.
- Eleventh page → Twelfth page: continues · Survey pages progress sequentially.
- Twelfth page → Thirteenth page: continues · Survey pages progress sequentially.
- Form page → Shared widgets: composes · Forms and selectors reuse shared UI primitives.
- Dashboard → Shared widgets: composes · Dashboard uses shared cards and spinner components.
- Form page → District service: fetches · Survey UI requests district and block data.
- District service → Location models: returns · Service layer populates structured location models.
- Shared widgets → Location models: renders · Reusable selectors and display widgets consume model data.
- Form page → App constants: reads · Shared labels and configuration support the workflow.
- Dashboard → Image assets: uses · Static imagery supports the app's presentation layer.
- Splash → Image assets: uses · Splash branding is backed by bundled assets.
- Android shell → Main app: hosts · Android native shell launches the Flutter entry point.
- iOS shell → Main app: hosts · iOS native shell launches the Flutter entry point.