onSearch method
override
Action upon selecting the Search option.
Implementation
@override
void onSearch(String searchTerm, {String? sentence = ''}) async {
if (appModel.isMediaOpen) {
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
await Future.delayed(const Duration(milliseconds: 5), () {});
}
await appModel.openRecursiveDictionarySearch(
searchTerm: searchTerm,
killOnPop: false,
);
if (appModel.isMediaOpen) {
await Future.delayed(const Duration(milliseconds: 5), () {});
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
}
}