chore : upgrade libs
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:rasadyar_core/core.dart';
|
||||
|
||||
/// Consolidated base logic controller that provides common functionality
|
||||
/// for pages with search and filter capabilities.
|
||||
///
|
||||
///
|
||||
/// This replaces the duplicate BaseLogic classes across different packages.
|
||||
class BasePageLogic extends GetxController {
|
||||
final RxBool isFilterSelected = false.obs;
|
||||
@@ -13,7 +13,7 @@ class BasePageLogic extends GetxController {
|
||||
|
||||
// Debounce time configuration
|
||||
static const Duration _defaultDebounceTime = Duration(milliseconds: 600);
|
||||
|
||||
|
||||
/// Sets up search callback with debouncing
|
||||
/// [onSearchChanged] will be called when search value changes after debounce delay
|
||||
/// [debounceTime] custom debounce duration, defaults to 600ms
|
||||
@@ -34,7 +34,7 @@ class BasePageLogic extends GetxController {
|
||||
/// Toggles search visibility state
|
||||
void toggleSearch() {
|
||||
isSearchSelected.value = !isSearchSelected.value;
|
||||
|
||||
|
||||
// Clear search when hiding
|
||||
if (!isSearchSelected.value) {
|
||||
clearSearch();
|
||||
@@ -43,8 +43,10 @@ class BasePageLogic extends GetxController {
|
||||
|
||||
/// Clears search input and resets state
|
||||
void clearSearch() {
|
||||
searchTextController.clear();
|
||||
searchValue.value = null;
|
||||
if (searchTextController.text.isNotEmpty) {
|
||||
searchTextController.clear();
|
||||
searchValue.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Toggles filter selection state
|
||||
@@ -62,7 +64,7 @@ class BasePageLogic extends GetxController {
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
|
||||
|
||||
// Bind search controller to reactive value
|
||||
searchTextController.addListener(() {
|
||||
searchValue.value = searchTextController.text;
|
||||
|
||||
Reference in New Issue
Block a user