navigateToSearch static method
Navigates to the search screen using go_router.
If query is provided, it will be pre-filled in the search field.
Implementation
static void navigateToSearch(BuildContext context, {String? query}) {
if (query != null && query.isNotEmpty) {
context.go('$searchPath?$queryParam=${Uri.encodeComponent(query)}');
} else {
context.go(searchPath);
}
}