mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-22 02:49:30 +00:00
search for books
This commit is contained in:
parent
a1e238fc25
commit
d372a6b096
12 changed files with 963 additions and 88 deletions
16
lib/features/explore/providers/search_controller.dart
Normal file
16
lib/features/explore/providers/search_controller.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'search_controller.g.dart';
|
||||
|
||||
/// The controller for the search bar.
|
||||
@Riverpod(keepAlive: true)
|
||||
class GlobalSearchController extends _$GlobalSearchController {
|
||||
@override
|
||||
Raw<SearchController> build() {
|
||||
final controller = SearchController();
|
||||
// dispose the controller when the provider is disposed
|
||||
ref.onDispose(controller.dispose);
|
||||
return controller;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue