dropinity 0.0.4
dropinity: ^0.0.4 copied to clipboard
a powerful and customizable paginated dropdown widget for Flutter
0.0.4 #
💾 Offline Caching
- Added offline caching support via
cacheKey,cacheToJson,cacheFromJson,onSaveCache, andonReadCacheproperties inDropinityPagifyData. - Enables persisting and restoring paginated data between sessions.
🔔 Expand / Collapse Callbacks
- New
onExpandcallback fired when the dropdown opens. - New
onCollapsecallback fired when the dropdown closes.
🔁 State Persistence
- Added
maintainStateflag to preserve the list scroll position and state when toggling the dropdown.
📣 Immediate onChanged Trigger
onChangedis now triggered on initialization when aninitialValueis set, so the parent widget always reflects the current selection.
✅ Multi-Selection Support
- Added
enableMultiSelectionflag to support selecting multiple items. - New
initialValueslist to pre-populate a multi-selection. - New
onListChangedcallback that returns the full list of selected items.
🚫 No-Data Alert
- Added
showNoDataAlerttoDropinityPagifyDatato control whether an alert is shown when the API returns an empty list.
⚙️ Improved Error Handling
errorBuildernow receives a typedPagifyExceptioninstead of a plainString.- New
ignoreErrorBuilderWhenErrorOccursAndListIsNotEmptyflag: whentrue, suppresses the error widget if the list already has data loaded. onErrorcallback signature updated to(BuildContext, int, PagifyException).
0.0.2 #
🔁 Pagination
- Integrated with the
pagifypackage for effortless pagination. - Supports async API calls with loading, success, and error states.
- Includes automatic retry, refresh, and filtering support.
🎨 Customizable UI
- Customizable main button (color, radius, padding, icons, size, etc.).
- Customizable text field for search input with full styling control.
- Animated dropdown with smooth transitions.
maintainStatebehavior ensures list state persists when toggled.
🔍 Smart Search
- Local search: filter through a predefined list of models.
- Remote search: perform API-based search through
Pagifycontrollers. - Automatically updates the list view based on search pattern.
🌐 Dual Data Modes
- Local Mode: Use predefined list of
Modelitems. - Remote Mode: Fetch paginated data from API using
Pagify.
🧩 Developer Friendly
- Simple
DropinityAPI with two constructors:Dropinity.withApiRequest()— for remote data.Dropinity()— for local data.
- Clear separation of configuration through data classes:
ButtonDataTextFieldDataValuesDataDropinityPagifyData
🧠 Built-In State Management
- Uses
ValueNotifierto maintain reactive dropdown, initialization, and list updates. - Efficiently toggles between open/close states with animation.