A comprehensive Flutter application for the Valuation Department, designed to handle land asset valuation, mapping, and property management operations.
- Overview
- Features
- Architecture
- Prerequisites
- Installation
- Running the Application
- Project Structure
- Dependencies
- Internationalization
- Development
- Build Flavors
- Contributing
The Land Asset Valuation System is a sophisticated Flutter application built for government valuation departments. It provides tools for property assessment, land mapping, asset management, and comprehensive reporting functionality.
- Land Acquisition Management: Complete workflow for land acquisition processes
- Mass Rating Operations: Bulk property rating and assessment tools
- Rating Assessment: Individual property valuation and rating
- Interactive Mapping: Mapbox-powered mapping with drawing and sketching tools
- Asset Division: Advanced tools for dividing properties into multiple assets
- Evidence Management: Sales and rental evidence collection and analysis
- Multi-language Support: English, Sinhala, and Tamil localization
- Real-time statistics and analytics
- Interactive charts and visualizations
- Quick access to all major functions
- Mapbox-powered mapping interface
- Polygon drawing and area calculations
- Floor management for multi-story buildings
- GPS coordinate integration
- Asset visualization and selection
- Land Acquisition (LA): Manage land acquisition processes
- Mass Rating (MR): Bulk property rating operations
- Rating Assessment (RA): Individual property assessments
- Rating Building (RB): Building-specific ratings
- Rating Object (RO): Object-specific valuations
- Land Miscellaneous (LM): General land management
- Sales evidence documentation
- Rental evidence management
- Building rates database
- Image upload and management
- Asset division functionality
- Condition reporting
- Rating card management
- Signature collection
- Document management
The application follows Clean Architecture principles with clear separation of concerns:
lib/
βββ app/ # Base application layer
βββ application/ # UI Layer (Presentation)
β βββ pages/ # Screen implementations
β βββ core/ # Shared UI components
β βββ base_app.dart # Main application setup
βββ data/ # Data Layer
β βββ models/ # Data models
β βββ datasource/ # Data sources (API, local)
β βββ repositories/ # Repository implementations
βββ domain/ # Business Logic Layer
β βββ entities/ # Domain entities
β βββ repositories/ # Repository interfaces
β βββ usecases/ # Business use cases
βββ flavors/ # Build configurations
βββ injection.dart # Dependency injection setup
- BLoC Pattern for complex state management
- Riverpod for dependency injection and state
- Cubit for simpler state scenarios
- Repository Pattern for data abstraction
- Dependency Injection with GetIt
- Clean Architecture layers
- MVVM with BLoC
- Flutter SDK: Version 3.2.5 or higher
- Dart SDK: Version 3.0+
- Android Studio / VS Code with Flutter plugins
- Mapbox Account: For mapping functionality
- API Access: Backend API credentials
- Android: API level 21+ (Android 5.0)
- iOS: iOS 11.0+
-
Clone the repository
git clone <repository-url> cd valuation_frontend
-
Install dependencies
flutter pub get
-
Configure environment variables
# Create .env file in project root cp .env.example .env # Edit .env with your configuration
-
Configure Mapbox
- Add your Mapbox access token to the environment configuration
- Follow Mapbox Flutter SDK setup guide
-
Generate code (if needed)
flutter packages pub run build_runner build
flutter run --flavor dev lib/flavors/main_dev.dart- Development:
--flavor dev lib/flavors/main_dev.dart - SIT:
--flavor sit lib/flavors/main_sit.dart - UAT:
--flavor uat lib/flavors/main_uat.dart - QA:
--flavor qa lib/flavors/main_qa.dart - Production:
--flavor prod lib/flavors/main_prod.dart
- Development: Landscape mode
- Production: Portrait mode
valuation_frontend/
βββ android/ # Android-specific configuration
βββ ios/ # iOS-specific configuration
βββ lib/ # Main Dart code
βββ assets/
β βββ images/ # Image assets
β βββ fonts/ # Custom fonts (Roboto, Poppins)
β βββ locales/ # Translation files
βββ test/ # Unit and widget tests
βββ docs/ # Documentation
βββ pubspec.yaml # Project dependencies
βββ README.md # This file
- flutter: Framework
- flutter_bloc: State management
- get_it: Dependency injection
- go_router: Navigation
- dio: HTTP client
- mapbox_maps_flutter: Mapping functionality
- google_fonts: Typography
- phosphor_flutter: Icons
- sizer: Responsive design
- fl_chart: Charts and graphs
- shared_preferences: Local storage
- flutter_secure_storage: Secure storage
- image_picker: Image selection
- geolocator: GPS functionality
- connectivity_plus: Network status
- flutter_test: Testing framework
- mockito: Mocking for tests
- build_runner: Code generation
- bloc_test: BLoC testing utilities
The application supports three languages:
- English (en): Primary language
- Sinhala (si): Sinhala localization
- Tamil (ta): Tamil localization
- Update translation files in
locales/directory - Add new keys to
app_strings.dart - Use
AppString.key.localize(context)in widgets
Some features require code generation:
flutter packages pub run build_runner build --delete-conflicting-outputs# Run all tests
flutter test
# Run specific test file
flutter test test/path/to/test_file.dart
# Run tests with coverage
flutter test --coverage- Use Flutter DevTools for debugging
- Check logs with
flutter logs - Use breakpoints in your IDE
The application supports multiple build flavors for different environments:
| Flavor | Purpose | Orientation | API Environment |
|---|---|---|---|
| dev | Development | Landscape | Development API |
| sit | System Integration Testing | Portrait | SIT API |
| uat | User Acceptance Testing | Portrait | UAT API |
| qa | Quality Assurance | Portrait | QA API |
| prod | Production | Portrait | Production API |
# Android
flutter build apk --flavor prod lib/flavors/main_prod.dart
# iOS
flutter build ios --flavor prod lib/flavors/main_prod.dart- Follow Dart/Flutter style guidelines
- Use meaningful variable and function names
- Add documentation for public APIs
- Write tests for new features
- Create feature branch from main
- Implement changes with tests
- Create pull request
- Code review and approval
- Merge to main
Follow conventional commit format:
feat: add asset division functionality
fix: resolve mapping coordinate issues
docs: update README with setup instructions
Developed for the Valuation Department
Version: 1.0.0+1
Built with Flutter π