openRecursiveDictionarySearch method
A helper function for doing a recursive dictionary search.
Implementation
Future<void> openRecursiveDictionarySearch({
required String searchTerm,
required bool killOnPop,
Function(String)? onUpdateQuery,
}) async {
_currentMediaPauseController.add(null);
if (searchTerm.trim().isEmpty) {
return;
}
await Navigator.push(
_navigatorKey.currentContext!,
PageRouteBuilder(
pageBuilder: (context, animation1, animation2) =>
RecursiveDictionaryPage(
searchTerm: searchTerm,
killOnPop: killOnPop,
onUpdateQuery: onUpdateQuery,
),
transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero,
),
);
refreshDictionaryHistory();
}