tab edit initial
This commit is contained in:
@@ -136,10 +136,16 @@ class SearchRoute extends GoRouteData with $SearchRoute {
|
||||
|
||||
final bool launchedFromIntent;
|
||||
|
||||
/// When provided, the search screen will load URLs into this existing tab
|
||||
/// instead of creating a new tab. This also changes the UI to show
|
||||
/// site-specific bangs instead of the tab type selector.
|
||||
final String? tabId;
|
||||
|
||||
const SearchRoute({
|
||||
required this.tabType,
|
||||
this.searchText = SearchRoute.emptySearchText,
|
||||
this.launchedFromIntent = false,
|
||||
this.tabId,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -150,6 +156,7 @@ class SearchRoute extends GoRouteData with $SearchRoute {
|
||||
? null
|
||||
: searchText,
|
||||
launchedFromIntent: launchedFromIntent,
|
||||
tabId: tabId,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -637,6 +637,7 @@ mixin $SearchRoute on GoRouteData {
|
||||
_$boolConverter,
|
||||
) ??
|
||||
false,
|
||||
tabId: state.uri.queryParameters['tab-id'],
|
||||
);
|
||||
|
||||
SearchRoute get _self => this as SearchRoute;
|
||||
@@ -647,6 +648,7 @@ mixin $SearchRoute on GoRouteData {
|
||||
queryParams: {
|
||||
if (_self.launchedFromIntent != false)
|
||||
'launched-from-intent': _self.launchedFromIntent.toString(),
|
||||
if (_self.tabId != null) 'tab-id': _self.tabId,
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user