## 3.2.24 - 2026-04-24

### Data — ESRI Export: USER_FRAME_ID Type Fix
- **FIXED**: `FeatureUtils.convertEntryToGeoJSONAttributes` now sends `USER_FRAME_ID` as an integer (via `int.tryParse`) instead of the raw string. Previously, the string FRAME_ID code (e.g. `FC02A15GY`) was sent directly to `USER_FRAME_ID` which is `esriFieldTypeInteger`, causing ESRI to fail with `"Conversion failed when converting the nvarchar value '...' to data type int."`. Non-numeric frame IDs now correctly send `null` (the field is nullable).

## 3.2.23 - 2026-04-24

### Map — Polygon Undo/Redo Fix
- **FIXED**: Drawing a new point after undoing now correctly clears the redo history. Previously, `_removedPoints` was never cleared on a fresh draw, so redoing after drawing a diverging point would insert stale points at the wrong position.
- **FIXED**: `redoLastPoint()` no longer routes through `addToMap()`. It now directly appends the point and draws the visual, so multi-step redo (undo 3 points, redo 3 points) works correctly — restoring one point per redo tap without wiping the remaining redo stack.
- **FIXED**: `_removedPoints` is now also cleared when the polygon is closed (via proximity snap or first-marker tap), since redo of individual drawing points has no meaning once the polygon is complete.

## 3.2.22 - 2026-04-24

### Data — Database Delete Fix
- **FIXED**: `DatabaseHelper.deleteDatabase()` now closes the open database connection before deleting the file. Previously, deleting the file while a connection was still open caused `disk I/O error` (sqflite code 6922) on any subsequent database operation.

## 3.2.21 - 2026-04-23

### Data — Local Database Clearing
- **ADDED**: `DataService.clearLocalDatabase()` — public method to wipe the local SQLite database, intended for use on user sign-out to prevent cross-account data leakage on shared devices.
- **ADDED**: `DataRepository.clearLocalDatabase()` — abstract method added to the repository interface.
- **ADDED**: `DataRepositoryImpl.clearLocalDatabase()` — delegates to `DataLocalDataSource`.
- **ADDED**: `DataLocalDataSource.clearLocalDatabase()` — abstract method added to the local data source interface.
- **ADDED**: `DataLocalDataSourceImpl.clearLocalDatabase()` — calls `DatabaseHelper.deleteDatabase()` to physically remove the SQLite database file.

## 3.2.20 - 2026-04-19

### Map — Polygon Drawing Undo/Redo
- **FIXED**: Polygon drawing now manages its own internal undo/redo stack, completely separate from the global `_stackManager`. Previously every tap was pushed to the shared stack, causing unrelated app actions to appear in the polygon undo history.
- **FIXED**: Undoing past a closed polygon now correctly re-opens it — removes the fill and closing line segment, restores vertex markers, and returns the polygon to the in-progress drawing state.
- **FIXED**: `startCategorization()` now clears the global action stack before beginning, preventing prior survey-drawing actions from bleeding into categorization undo/redo.
- **ADDED**: `MapGeometryPolygon.undoLastPoint()` — handles both the closed state (re-open) and open state (remove last point/line/marker).
- **ADDED**: `MapGeometryPolygon.redoLastPoint()` — re-applies previously undone points.
- **UPDATED**: `canUndo` / `canRedo` getters reflect polygon internal state when a polygon is active.
- **UPDATED**: `undoLastAction()` / `redoLastAction()` in `MapService` route to polygon methods when a polygon is being drawn.

### Map — Polygon Vertex Markers
- **CHANGED**: Vertex markers are now hidden as soon as the polygon is completed (drawn closed or loaded from DB). Previously markers remained visible after closing.
- **ADDED**: `_removeAllPointMarkers()` — removes all vertex markers when polygon completes.
- **ADDED**: `_restorePointMarkers()` — re-adds vertex markers for all current points when a closed polygon is re-opened via undo.

### Map — Non-Clustered Entry Display Numbers
- **FIXED**: Non-clustered (uncategorized) entries on the map now display sequential positions 1, 2, 3... relative to the pending group, instead of their raw database row IDs. This matches the behaviour after categorization, where each cluster restarts numbering at 1.
- **ADDED**: `_getUncategorizedEntryPosition()` in `MapService` — returns 1-indexed position within uncategorized features sorted by entry ID.

### Map — mapId Pipeline
- **ADDED**: `mapId` field to `DataFromMapEntity` and `DataFromMapModel` — carries the cluster position (uncategorized count + 1) from the map tap into the form layer.
- **UPDATED**: `MapService._handleMapTap` sets `mapId: uncategorizedEntriesCount + 1` on the `DataFromMapModel` passed to the app.
- **ADDED**: `mapId` field to `FormBuilderInput` (default `0`) — threads the map-resolved position into the form builder.
- **ADDED**: `useMapId: bool` config field on `FormFieldEntity` and `FormFieldModel` (default `false`) — when `true`, the field displays the cluster position (`mapId`) instead of the global sequential auto-increment ID.
- **UPDATED**: `FormFieldModel.fromJson` reads `useMapId` from both `"useMapId"` and `"use_map_id"` keys; `fromParser` reads `"useMapId"` key.
- **UPDATED**: `TextFieldWidget` initialises and restores its value from `input.mapId` when `field.useMapId` is true and `mapId > 0`.
- **REMOVED**: Save-time `useMapId` override in `DataService` — the form-captured value is saved as-is; no cluster position injection at save time.

### Address Verification — Filtering
- **FIXED**: `_filterByUserStateAndLga` no longer filters out all addresses when the current user has no assigned states or LGAs — it now returns all addresses unfiltered in that case.
- **FIXED**: Addresses whose own `state`/`lga` fields are empty or null now pass the filter instead of being excluded.
- **FIXED**: Assigned-tab filter now uses `userId` only to determine assignment — state/LGA fields are no longer checked, so addresses remain visible even if the user has since been unassigned from those areas.

---

## 3.2.17 - 2026-04-14

### EnumPay Configuration
- **ADDED**: `ModulesConfig.isEnumPay` flag — when `true`, the user repository fetches projects from the `GetAllDeployedProjectCompendiums` endpoint instead of the client-scoped endpoint, matching EnumPay's deployment model.
- **ADDED**: `UserService.getAllDeployedProjects()` method and corresponding abstract declaration in `UserRepository`.
- **UPDATED**: `_processUserLogin` in `UserRepositoryImpl` now branches on `ModulesConfig.isEnumPay` to select the correct project-fetching strategy.

### Deployment Data
- **ADDED**: `DeploymentDataEntity` — new domain entity with `deploymentRequestId`, `paymentPerTask`, `deploymentStatus`, and `projectEligibilityRequirement` fields.
- **ADDED**: `DeploymentDataModel` — data-layer model with `fromJson` parsing for `DeploymentDataEntity`, exported from `user.dart`.
- **UPDATED**: `ProjectCompendiumEntity` now carries a nullable `deploymentData: DeploymentDataEntity?` field.
- **UPDATED**: `ProjectCompendiumModel.fromJson` now parses the `deploymentData` key and populates the entity.
- **EXPORTED**: `DeploymentDataEntity` added to `common.dart`; `DeploymentDataModel` added to `user.dart`.

### Project Compendium — New Fields
- **ADDED**: Location fields (`latitude`, `longitude`, `locationName`, `locationCode`) to `ProjectCompendiumEntity` and `ProjectCompendiumModel`.
- **ADDED**: `category` and `solution` string fields to `ProjectCompendiumEntity` and `ProjectCompendiumModel`.
- **ADDED**: Asset icon path helpers on `ProjectCompendiumModel` for use in UI layers.

### User — Enumeration Account Creation
- **ADDED**: `EnumerationCreateAccountModel` — dedicated model for creating enumeration-type accounts.
- **ADDED**: `createEnumerationAccount(EnumerationCreateAccountModel)` method in `UserRemoteDataSource`, `UserRepository`, and `UserService`.
- **UPDATED**: `user.dart` exports updated to include the new model.

### Profile & User Entity
- **ADDED**: `designationName` getter on `UserProfileEntity` — maps raw `designation` values to display-friendly labels (e.g. `'owner'` → `'Project Owner'`); returns the raw value as-is for unmapped designations.
- **ENHANCED**: Profile completion percentage calculation updated to account for new optional fields.

### Wallet Transactions
- **ADDED**: `event`, `projectId`, and `userId` fields to `WalletTransactionEntity` and `WalletTransactionModel`, providing richer transaction context for display and filtering.

### Payment Info
- **FIXED**: `getUserPaymentInfoByUserId` now uses `.firstOrNull` instead of `.first` when extracting payment info from the API list response — prevents a `Bad state: No element` crash when the user has no payment information saved.
- **ENHANCED**: Bank list page size increased to return a more complete list in a single request.

### Database
- **FIXED**: Incorrect SQL table name quoting and formatting in `DataLocalDataSourceImpl` — resolves edge-case query failures on tables whose names require quoting.

### Configuration Schema
- **REFACTORED**: `config_file_schema.json` — `enum` and `required` arrays reformatted for readability (no functional change).

---

## 3.2.16 - 2026-04-07

### Form — File Widget
- **ENHANCED**: `FileConfigEntity` default `allowedTypes` extended to include `jpg`, `xlsx`, `csv`, `mp4`, and `mp3` (previously only `jpeg`, `png`, `pdf`, `doc`, `docx`).
- **ADDED**: Special `"all"` wildcard value — when `allowed_types` is set to `"all"` (or a list containing `"all"`), the OS file picker opens with no extension filter (`FileType.any`), accepting any file.
- **ADDED**: `FileConfigEntity.isAllTypes` getter as the single check-point consumed by `MilsatFileWidget` and `FileConfigModel`.
- **ENHANCED**: `FileConfigModel.fromJson` now accepts `allowed_types` as either a plain `String` (`"all"`) or the existing `List<String>` form.
- **ENHANCED**: File widget empty state now displays `"Any file type"` instead of listing every extension when `isAllTypes` is `true`.
- **ENHANCED**: File icon set expanded — `xlsx`/`csv` → `Icons.table_chart` (teal), `mp4`/`mov`/`avi` → `Icons.play_circle_outline` (purple), `mp3`/`aac`/`wav` → `Icons.audio_file` (orange).
- **UPDATED**: `config_file_schema.json` — `ui_type` enum now includes `"file"` and `"biometric"`; `file_config` property added with `allowed_types` (`oneOf`: `"all"` string or typed array) and `max_files` (`integer ≥ 1`).

---

## 3.2.15 - 2026-03-31


### Address Verification
- **FIXED**: `MapService._generateAndNotifyDataFromMap` now supplies the **tapped point** coordinates (`featureLat`/`featureLng`) as `userLat`/`userLong` in `DataFromMapModel` when in address verification mode, instead of the user's GPS location (`_lastLocation`). Previously, saving an address point or loading the verification form always used the surveyor's GPS position rather than the selected map point.

---

## 3.2.14 - 2026-03-12


### Form & Data Sync
- **ENHANCED**: `FormBuilder` now dynamically fetches the next auto-incremented `ID` using `FormDataService.getIdForEntryToBeInserted` instead of generating a timestamp array. This ensures sequential IDs based on the database entry count.
- **FIXED**: Removed `Uri.encodeComponent` on `whereClause` inside `DataRepositoryImpl.fetchFeatures` and `fetchFeatureCount`. This prevents the C# proxy server from performing double-encoding, resolving `400 Bad Request` ESRI query errors related to `%20` and `%27`.

---

## 3.2.13 - 2026-03-12
### Data Sync & Configuration
- **FIXED**: `StringUtils.getESRiValueType` now correctly wraps all `FRAME_ID` values in single quotes regardless of numeric content. This prevents `400 Bad Request` ESRI errors caused by strict type-matching configurations.
- **FIXED**: Deduplicated database column names during script generation in `_saveConfigToDatabase` to prevent SQLite "duplicate column name" crashes when handling overlapping nested JSON schemas like parent/watcher location columns (e.g. `STATE_NAME`).
- **ENHANCED**: Added strict re-throwing of database exceptions in `_saveConfigToDatabase` to ensure failures during `importConfig` table generation accurately bubble up to the caller rather than failing silently.

---

## 3.2.10 - 2026-02-20

### Map
- **ADDED**: Work area visibility state now persists across app reloads via SharedPreferences, scoped per survey ID
- **ENHANCED**: `showHideWorkArea()` saves visibility changes immediately; `initialize()` restores them on reload

### Dependencies
- **UPDATED**: Bumped `dio`, `equatable`, `get_it`, `flutter_svg`, `shared_preferences`, `http`, `device_info_plus`, `expressions`, `image_picker`, `file_picker`, `json_schema`, `uuid`, `mapbox_maps_flutter` to latest versions
- **REMOVED**: `json_annotation` dependency (unused)
- **REMOVED**: `flutter_bloc` dependency (unused at module level)

### Housekeeping
- **FIXED**: Removed `@JsonSerializable` annotation and `json_annotation` import from `ProductModel`
- **REMOVED**: Unused `assets/icons/pngs/` asset directory reference

---

## 3.2.9 - 2026-02-19

### Location Dropdown
- **ENHANCED**: Pre-fill location dropdowns with existing values **before** API calls — values appear instantly and persist even if API is slow or fails
- **ENHANCED**: `_loadInitialData` and `_loadChildData` now merge API results with pre-selected values, ensuring uniqueness
- **ENHANCED**: API failure recovery — marks data as loaded and sets up `executeRefs` so the cascade proceeds with existing values
- **ENHANCED**: `initState` immediately populates `_formFieldValue`, `_loadedValues`, and reports value to form builder via `onUIFieldValueChange`

---

## 3.2.8 - 2026-02-18

### ESRI Request Model
- **ADDED**: `clientId`, `projectCompendiumId`, and `frameId` parameters to `FormBuilder`, `FormPage`, and `MilsatLocationWidget`
- **ENHANCED**: `fetchLocationFieldValues` now passes `clientId`, `projectCompendiumId`, `frameId`, and hardcoded `requestPurposes: 'Frame'` to ESRI endpoints
- **ENHANCED**: `getWorkAreas` in `DataService` now passes `frameId` from `project.frameTypeId`

### Form Widgets
- **FIXED**: `DatePickerConfig` — changed `DatePickerTheme` to `DatePickerThemeData` to match Flutter API
- **FIXED**: `TimePickerConfig` — changed `TimePickerTheme` to `TimePickerThemeData` to match Flutter API
- **FIXED**: `date_picker_widget.dart` and `time_picker_widget.dart` `copyWith` usage corrected for theme data types

---

## 3.2.7 - 2026-02-17

### Form Widgets
- **ENHANCED**: Type-specific input formatters for `MilsatTextFieldWidget` — email fields deny whitespace, phone/number/INTEGER fields use `digitsOnly`, REAL/FLOAT/DOUBLE/LONGITUDE/LATITUDE fields allow `[0-9.-]`
- **ADDED**: 10-minute TTL to `LocationFieldCache` to prevent stale data after extended app use

### Location Dropdown
- **FIXED**: Race condition in `_autoPopulateFromValue` — no longer short-circuits when value is already set, ensuring data loading and cascade setup
- **FIXED**: Prefilled name field path in `build()` now triggers `_loadInitialData` to set up necessary references for cascading

### Map
- **FIXED**: Work area label text too large causing truncation — reduced default font size from 32 to 14 for full visibility
- **ENHANCED**: Increased label padding from 4px to 8px for better readability

---

## 3.2.6 - 2026-02-16

### Map
- **FIXED**: Polygon and LineString categorization — `isCategoryEmpty` now correctly handles Point, Polygon, and LineString geometries using centroid calculation instead of assuming all geometries are points
- **ENHANCED**: Location dropdown minor stability improvements

---

## 3.2.5 - 2026-02-16

### Location Dropdown
- **FIXED**: Code field value propagation to inner text fields with refined conditional disabling logic for code fields
- **ENHANCED**: Major location dropdown reliability improvements — initial data retry mechanism and corrected ref execution timing
- **ADDED**: Content-based `hashCode` for `LocationFieldCacheKey` for proper cache key comparison
- **ENHANCED**: Form builder improvements for better location field integration

### Data Service
- **FIXED**: Minor data service correction for survey handling

### Location Service
- **ENHANCED**: Improved ArcGIS query strategy in location remote data source for better frame ID retrieval

---

## 3.2.4 - 2026-01-30

### Map
- **ENHANCED**: Map extensions with improved geometry handling and utility functions
- **ENHANCED**: Map service improvements for better annotation management

### Location Dropdown
- **ENHANCED**: Location dropdown widget reliability and state management improvements

### Documentation
- **UPDATED**: README.md with comprehensive usage examples and improved documentation

---

## 3.2.3 - 2026-01-29

### Address Verification
- **ENHANCED**: Improved field mapping in `fetchAndParseAddressVerificationConfig` with normalized key matching (case-insensitive, underscore-agnostic)
- **ADDED**: Helper function `findMatchingColumn()` for robust form field to backend field mapping
- **FIXED**: State and LGA fields now properly pre-populate regardless of column naming conventions (STATE_NAME, state_name, State, etc.)
- **ADDED**: Image sync before address verification update - automatically uploads local images before API submission
- **ADDED**: `_syncImagesForAddresses()` and `_syncImagesForAddress()` methods for parallel image upload
- **ENHANCED**: Images containing `tempImagesDirectory` path are detected and uploaded automatically

### Data Models
- **ENHANCED**: `VerificationAddressModel.fromJson()` now syncs `dynamicProperties` to `additionalProperties` on load
- **ADDED**: `VerificationAddressModel.toApiJson()` method that syncs and sends both `dynamicProperties` and `additionalProperties`
- **FIXED**: Proper type casting for `dynamicProperties` and `additionalProperties` in JSON parsing

### Dependencies
- **ADDED**: `dart:io` import to address verification service for file operations
- **ADDED**: `CommonConstants` import for temp images directory detection

## 1.3.5 - 2026-01-26

### Authentication & Security
- **FIXED**: Logout API call is now only performed when PPQ authentication is active, preventing unnecessary calls.
- **ENHANCED**: Access token retrieval directly from shared preferences for improved reliability.
- **IMPROVED**: Added capability for API requests to skip default headers when needed.

### Network & Performance
- **ENHANCED**: Increased API client connection and receive timeouts to 60 seconds for better handling of slow network conditions.
- **OPTIMIZED**: Conditionally fetch PPQ wallet details and cost per iUnit based on `ModulesConfig.usePpqAuth` setting, improving efficiency when PPQ is disabled.

## 1.3.3 - 2025-12-18

### Bug Fixes & Code Quality
- **FIXED**: Removed debug print statements from `TokenRefreshInterceptor` for cleaner production code
- **FIXED**: Removed debug print statements from `DataService._saveConfigToDatabase` for cleaner code
- **FIXED**: Corrected endpoint name for IntelligenceWallet TransferIUnit in ppqEndpoints list

### API Endpoints
- **ADDED**: IntelligenceWallet TransferIUnits endpoint to ppqEndpoints list for proper token refresh handling
- **ENHANCED**: Expanded ppqEndpoints list with comprehensive API endpoint coverage including:
  - Authentication endpoints (login, logout, token refresh)
  - Profile management endpoints
  - OTP verification endpoints
  - File handling endpoints
  - Intelligence wallet endpoints
  - Payment services endpoints
  - Nigeria dataset endpoints

### Debugging & Developer Experience
- **ADDED**: Debug logging to `DataService` for improved database operation visibility during development
- **ADDED**: Debug logging to `AuthTokenManager` for better token management visibility
- **ADDED**: Debug logging to `TokenRefreshInterceptor` for token handling and request processing insights

### Data Service
- **ADDED**: Optional `skipWorkFrameCheck` parameter to `DataService.importConfig()` for flexible work frame validation
- **ENHANCED**: Work frame validation can now be bypassed when needed for special use cases

### Error Handling
- **IMPROVED**: Enhanced error handling in `TokenRefreshInterceptor` with safe null checks
- **IMPROVED**: Enhanced `AuthResponse` model with safe null checks to prevent runtime errors

## 1.3.2 - 2025-12-17

### Minor Updates
- Version bump for dependency updates and minor fixes

## 1.3.1 - 2025-12-16

### Network & Configuration
- **ADDED**: `ModulesConfig.getApiClient()` - Centralized access to ApiClient instance
- **ENHANCED**: Exposed ApiClient through ModulesConfig instead of UserConfig for better separation of concerns
- **IMPROVED**: Network service integration with proper dependency injection access

### Authentication
- **ENHANCED**: Dual auth support (PPQ/Enum) with dynamic endpoint selection
- **ADDED**: `usePpqAuth` flag to ModulesConfig for auth provider switching (default: true)
- **IMPROVED**: Token refresh interceptor supports both PPQ (`api/connect/token`) and Enum (`connect/token`) endpoints
- **ENHANCED**: AuthTokenManager with dynamic refresh token body generation based on auth provider
- **ADDED**: Client credentials (client_id/client_secret) support for Enum auth provider
- **IMPROVED**: Logout functionality across all layers (data source, repository, service)

**Breaking Changes:**
- `ModulesConfig.initialize()` now accepts optional `usePpqAuth` parameter (defaults to true for backward compatibility)

**Migration Guide:**
```dart
// For PPQ auth (default - no change needed)
await ModulesConfig.initialize(
  baseUrl: 'your-base-url',
  ppqBaseUrl: 'your-ppq-url',
);

// For Enum/Standard auth
await ModulesConfig.initialize(
  baseUrl: 'your-base-url',
  ppqBaseUrl: 'your-ppq-url',
  usePpqAuth: false,
);

// Access ApiClient
final apiClient = ModulesConfig.getApiClient();
```

## 1.3.0 - 2025-11-09

### Authentication & Token Management
- **NEW**: Automatic token refresh interceptor for Dio HTTP client
- **NEW**: `AuthTokenManager` - Centralized token management with expiry tracking
- **NEW**: `TokenRefreshInterceptor` - Proactive token refresh before expiration
- **ENHANCED**: Token storage with expiry time calculation
- **ENHANCED**: Refresh token support in auth responses
- **IMPROVED**: Session management with automatic token renewal (60-second buffer before expiry)
- **ADDED**: Mutex-based thread-safe token refresh to prevent concurrent refresh attempts

**Technical Details:**
- Token refresh happens automatically before API requests if token expires within 60 seconds
- Handles 401 errors with automatic retry after token refresh
- Clears tokens gracefully on refresh failure
- Updated `SharedPrefKeys` with `refreshToken` and `tokenExpiryTime` keys
- Updated `AuthResponse` model to include refresh token field
- Integration with unified `ApiClient` for all network requests

### Form Widget Optimizations
- **FIXED**: Date picker widget - Proper conditional execution on initial values
- **FIXED**: Time picker widget - Proper conditional execution on initial values
- **FIXED**: Signature widget - Proper conditional execution on initial values
- **FIXED**: Picture widget - Proper conditional execution on initial values
- **ENHANCED**: All form widgets now use `TextEditingController` for proper state management (date/time pickers)
- **IMPROVED**: Conditional logic execution timing - no longer triggers before dependent widgets are created
- **ADDED**: `_setContentWithoutConditionals()` method for initial load without side effects
- **ADDED**: `_executeConditionalsNow()` method for deferred conditional execution
- **ADDED**: `_needsConditionalExecution` flag to track when conditionals should run
- **ENHANCED**: All form widgets now properly handle `mounted` checks in setState calls
- **IMPROVED**: Widget lifecycle management with proper disposal and state updates

**Widget-Specific Changes:**
- **Date Picker**: Now uses controller instead of initialValue for dynamic updates
- **Time Picker**: Now uses controller instead of initialValue, removed unnecessary parameters
- **Signature & Picture**: Optimized conditional execution without controllers (as intended)

**Technical Pattern:**
```dart
// Conditionals execute in postFrameCallback for initial values
if (_needsConditionalExecution) {
  WidgetsBinding.instance.addPostFrameCallback((_) {
    if (mounted) _executeConditionalsNow();
  });
}

// Conditionals execute immediately for user actions
widget.field.conditionals?.forEach((conditional) {
  _executeConditionals?.call(conditional);
});
```

### Bug Fixes
- **FIXED**: Form widgets triggering conditionals during initialization causing dependency issues
- **FIXED**: Controllers not updating when values change programmatically
- **FIXED**: Initial values not executing conditionals after dependent widgets are ready

---

## 1.2.9 - 2025-10-31

### Module Updates
- **ENHANCED**: Various module optimizations and performance improvements
- **UPDATED**: Minor internal enhancements and code cleanup
- **IMPROVED**: General stability improvements

## 1.2.8 - 2025-10-28

### Network Layer Refactor
- **REFACTORED**: Major improvements to `api_client.dart` and `response_handler.dart` for better reliability and maintainability
- **ENHANCED**: Improved request/response handling
- **IMPROVED**: Error handling and response parsing logic

### Dependency Update
- **UPDATED**: Minor dependency update in `milsat_modules_flutter.dart`

### Documentation
- **UPDATED**: README.md with new usage examples, badges, and improved structure
- **UPDATED**: Changelog and pubspec.yaml for latest release

---
## 1.2.7 - 2025-10-27

### Map Module Refactor & Enhancements
- **REFACTORED**: Geometry entity now uses a strongly typed coordinates list for improved type safety
- **ENHANCED**: Map geometry base and polygon classes updated for new Mapbox API compatibility
- **IMPROVED**: Polygon and point annotation click listeners now use modern tap event handling
- **ENHANCED**: Centroid calculation and multi-polygon support for work area visualization
- **UPDATED**: Symbol generator refactored for Flutter 3.35+ and improved icon creation
- **FIXED**: Various annotation and geometry event handling bugs

### Developer Notes
- Refactoring improves maintainability and future extensibility of map features
- New tap event handling aligns with latest Mapbox and Flutter APIs
- Symbol generation now more robust and customizable

### Bug Fixes & Improvements
- **FIXED**: Label overflow issues in form widgets for better text display
- **ENHANCED**: Exposed data utilities in map module for better accessibility
- **IMPROVED**: Form presentation widget rendering and layout

### Technical Details
- Fixed text overflow in `global_widget.dart` with improved text wrapping
- Exposed additional data utilities through map module exports
- Enhanced widget rendering stability

---

## 1.2.6 - 2025-10-23

### Data Service Enhancements
- **NEW**: `getSurveyById()` method - Retrieve specific survey by ID
- **ENHANCED**: Survey retrieval with improved error handling and validation
- **IMPROVED**: Current survey state management - automatically sets current survey when found
- **ENHANCED**: Survey lookup functionality with comprehensive exception handling

### Technical Details
- Added new survey lookup method with ID-based filtering
- Improved survey state management for better user experience
- Enhanced error handling for missing surveys with descriptive messages
- Optimized survey retrieval from configuration files

---

## 1.2.4 - 2025-10-23

### Major Updates

#### 🗺️ Map Module - Complete Rewrite
- **NEW**: Complete Mapbox integration with `mapbox_maps_flutter` dependency
- **NEW**: Advanced geometry drawing capabilities (Point, Line, Polygon)
- **NEW**: Interactive map service with touch/click handling and debouncing
- **NEW**: Work area visualization and management
- **NEW**: Undo/Redo functionality for map actions using action stack
- **NEW**: Dynamic icon generation for map symbols and points
- **NEW**: Map camera controls with smooth animations
- **NEW**: Feature zoom and navigation capabilities
- **NEW**: Base map management and switching
- **NEW**: Memory optimization for low-end devices
- **ENHANCED**: Geometry validation and error handling
- **ENHANCED**: Clean Architecture implementation for map domain

**New Map Classes:**
- `MapService` - Main map service with full Mapbox integration
- `MapGeometryBase`, `MapGeometryPolygon` - Geometry drawing and management
- `MapActionStackManager` - Undo/redo system
- `SymbolGenerator` - Dynamic icon creation
- Multiple geometry models and entities
- Comprehensive map constants and configurations

#### 📊 Data Module Enhancements
- **NEW**: `isConfigOrSurveyImported()` - Check if specific forms are imported
- **NEW**: `getAllSurveyFormsForAParticularSurvey()` - Get all forms for a survey
- **NEW**: `getAllSurveys()` - Retrieve all available surveys
- **ENHANCED**: Better error handling and result patterns
- **ENHANCED**: Survey form retrieval and management

#### 🔧 Dependencies
- **ADDED**: `mapbox_maps_flutter: ^2.11.0` for advanced mapping capabilities

#### 🏗️ Architecture Improvements
- **ENHANCED**: Feature-first Clean Architecture maintained across new map module
- **ENHANCED**: Proper separation of concerns in map domain/data layers
- **ENHANCED**: Comprehensive error handling with custom exceptions

---

## 1.2.3 - 2025-09-20

### Features & Improvements
- **ENHANCED**: Form builder improvements and optimizations
- **ENHANCED**: Location form widgets and functionality
- **ENHANCED**: Network layer optimizations
- **FIXED**: Various bug fixes and stability improvements

---

## 1.2.2 - 1.2.0 - 2025-09-20

### Authentication & User Management
- **ENHANCED**: Login performance optimizations to reduce authentication time
- **ENHANCED**: User authentication flow improvements
- **ENHANCED**: Network layer optimizations for better performance
- **ENHANCED**: User repository and data source improvements

### Form Builder Updates
- **ENHANCED**: Dynamic form rendering capabilities
- **ENHANCED**: Form validation improvements
- **ENHANCED**: Widget rendering optimizations

---

## 1.1.9 - 1.1.0 - 2025-09-20

### Location Services
- **ENHANCED**: Location form components and functionality
- **NEW**: Date picker widget for location forms
- **ENHANCED**: Location data management
- **IMPROVED**: Location service reliability

### Form Enhancements
- **ENHANCED**: Form builder architecture
- **ENHANCED**: Dynamic form validation
- **ENHANCED**: Form widget rendering
- **ENHANCED**: Form data handling

---

## 1.0.9 - 1.0.3 - 2025-09-20

### Map Services Foundation
- **NEW**: Initial map service implementation
- **NEW**: Basic map functionality
- **NEW**: Map data structures
- **ENHANCED**: Geospatial data handling

### Core Improvements
- **ENHANCED**: Level information handling
- **ENHANCED**: Module configuration
- **ENHANCED**: Core service architecture

---

## 1.0.2 - 2025-09-16

### User Management Expansion
- **NEW**: Create account endpoint integration
- **NEW**: OTP (One-Time Password) creation and management
- **NEW**: Password reset functionality
- **NEW**: Enhanced user authentication flow
- **ENHANCED**: User service architecture
- **ENHANCED**: Remote data source implementations

### Models & Services
- **NEW**: `CreateAccountModel` for account creation
- **NEW**: `ResetPasswordModel` for password management
- **ENHANCED**: User repository with expanded functionality
- **ENHANCED**: API client improvements

---

## 1.0.1 - 2025-09-16

### Module Configuration & Setup
- **NEW**: Complete module configuration system
- **ENHANCED**: Dependency injection setup
- **ENHANCED**: Project structure organization
- **ENHANCED**: Build and deployment configuration

---

## 1.0.0 - 2025-09-16

### Initial Stable Release

This release introduces the first stable version of `milsat_modules_flutter`, a comprehensive Flutter package for geospatial data collection, user management, dynamic form rendering, data export/sync, and hierarchical location services. Built with feature-first Clean Architecture, each module is independent and can be used standalone or integrated together.

#### Core Modules
- **Common Module**: Shared entities, error/result models, network utilities, and configuration
- **User Module**: Authentication, user management, project compendium, white-label config, and verification address support
- **Form Module**: Dynamic form rendering, validation, conditional logic, script evaluation, and reusable UI widgets
- **Data Module**: Data management, export, sync, survey entities, and configuration import
- **Location Module**: Hierarchical location services, CSV-based data management, polling units, wards, LGAs, and more

#### Architecture
- **Feature-first Clean Architecture**: Each module follows clean architecture principles
- **Dependency injection**: Comprehensive DI setup with GetIt
- **Modular design**: All modules can be used independently or together
- **Domain-driven**: Each module exports domain entities, repository interfaces, and service APIs

#### Dependencies & Compatibility
- **Flutter**: Compatible with Flutter >=3.8.1
- **Dart SDK**: ^3.8.1
- **Core Dependencies**: 
  - Dio for HTTP client
  - Flutter Bloc for state management
  - GetIt for dependency injection
  - Sqflite for local database
  - And many more specialized packages

#### Testing & Documentation
- **Unit Tests**: Comprehensive test coverage
- **Integration Tests**: End-to-end testing support
- **Documentation**: Complete API documentation and usage examples

#### Assets & Resources
- **CSV Data**: Preloaded location data (INEC PU, NIPOST locations, zones)
- **JSON Schemas**: Configuration file validation schemas
- **Multi-platform**: Support for iOS, Android, and other Flutter platforms

See README and API documentation for detailed usage examples and integration guides.