Skip to content

基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。

Update search_page.dart (#1174)

floating142896ba4dab87c
diff --git a/lib/pages/search/search_page.dart b/lib/pages/search/search_page.dart
index 15cf7740..ea524104 100644
--- a/lib/pages/search/search_page.dart
+++ b/lib/pages/search/search_page.dart
@@ -120,33 +120,36 @@ class _SearchPageState extends State<SearchPage> {
children: [
Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 16),
- child: SearchAnchor.bar(
- searchController: searchController,
- barElevation: WidgetStateProperty<double>.fromMap(
- <WidgetStatesConstraint, double>{WidgetState.any: 0},
- ),
- viewElevation: 0,
- viewLeading: IconButton(
- onPressed: () {
- Navigator.of(context).pop();
+ child: FocusScope(
+ descendantsAreFocusable: false,
+ child: SearchAnchor.bar(
+ searchController: searchController,
+ barElevation: WidgetStateProperty<double>.fromMap(
+ <WidgetStatesConstraint, double>{WidgetState.any: 0},
+ ),
+ viewElevation: 0,
+ viewLeading: IconButton(
+ onPressed: () {
+ Navigator.of(context).pop();
+ },
+ icon: Icon(Icons.arrow_back),
+ ),
+ isFullScreen: MediaQuery.sizeOf(context).width <
+ LayoutBreakpoint.compact['width']!,
+ suggestionsBuilder: (context, controller) => <Widget>[
+ Container(
+ height: 400,
+ alignment: Alignment.center,
+ child: Text("无可用搜索建议,回车以直接检索"),
+ ),
+ ],
+ onSubmitted: (value) {
+ searchPageController.searchBangumi(value, type: 'init');
+ if (searchController.isOpen) {
+ searchController.closeView(value);
+ }
},
- icon: Icon(Icons.arrow_back),
),
- isFullScreen: MediaQuery.sizeOf(context).width <
- LayoutBreakpoint.compact['width']!,
- suggestionsBuilder: (context, controller) => <Widget>[
- Container(
- height: 400,
- alignment: Alignment.center,
- child: Text("无可用搜索建议,回车以直接检索"),
- ),
- ],
- onSubmitted: (value) {
- searchPageController.searchBangumi(value, type: 'init');
- if (searchController.isOpen) {
- searchController.closeView(value);
- }
- },
),
),
Expanded(