improve search flow

This commit is contained in:
Fabian Freund
2026-06-02 12:53:29 +02:00
parent 84ae5e71dd
commit 661e3c29d9
4 changed files with 97 additions and 22 deletions
+21
View File
@@ -101,6 +101,27 @@ void showInfoMessage(
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}
void showFindInPageSuggestion(
BuildContext context, {
required String query,
required VoidCallback onFind,
Duration duration = const Duration(seconds: 5),
bool persist = false,
}) {
final snackBar = _createFloatingSnackBar(
content: Text(
'Find "${_truncateForSnackBar(query)}" on this page?',
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
action: SnackBarAction(label: 'Find', onPressed: onFind),
duration: duration,
persist: persist,
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}
void showOpenedTabsFromAnotherDeviceMessage(
BuildContext context,
int openedTabs, {