utils/security/searchbar_security
library
Functions
-
safeSearchCallback(void callback(String)?, String value, {String context = 'Search callback'})
→ void
-
Safely executes a search callback with error handling.
-
safeSearchVoidCallback(VoidCallback? callback, {String context = 'Search void callback'})
→ void
-
Safely executes a void callback with error handling.
-
validateDebounceDuration(int? duration, {int defaultValue = 300, bool? enableSecurity})
→ int
-
Validates debounce duration within configured bounds.
-
validateSearchBarBorderRadius(double? radius, {required double defaultValue, bool? enableSecurity})
→ double
-
Validates border radius within configured bounds.
-
validateSearchBarFontSize(double? fontSize, {required double defaultValue, bool? enableSecurity})
→ double
-
Validates font size within configured bounds.
-
validateSearchBarHeight(double? height, {required double defaultValue, bool? enableSecurity})
→ double
-
Validates search bar height within configured bounds.
-
validateSearchBarIconSize(double? size, {required double defaultValue, bool? enableSecurity})
→ double
-
Validates icon size within configured bounds.
-
validateSearchBarPadding(double? padding, {required double defaultValue, bool? enableSecurity})
→ double
-
Validates padding within configured bounds.
-
validateSearchQuery(String? query, {bool? enableSecurity})
→ String
-
Validates and sanitizes search query.
Returns the validated query string.