mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-10 03:57:39 +08:00
ui: revert searchbar
This commit is contained in:
@@ -193,27 +193,31 @@ class _MainSkeletonState extends State<MainSkeleton> {
|
|||||||
),
|
),
|
||||||
leadingWidth: isSmallScreen(context) ? 0 : 190,
|
leadingWidth: isSmallScreen(context) ? 0 : 190,
|
||||||
title: Container(
|
title: Container(
|
||||||
alignment: Alignment.bottomLeft,
|
alignment: Alignment.bottomLeft,
|
||||||
child: SizedBox(
|
child: SearchAnchor(
|
||||||
width: 250,
|
builder: (BuildContext context, SearchController controller) {
|
||||||
child: TextField(
|
return Container(
|
||||||
decoration: InputDecoration(
|
constraints: const BoxConstraints(maxWidth: 250, maxHeight: 40),
|
||||||
prefixIcon: Icon(
|
child: Opacity(
|
||||||
Icons.search,
|
opacity: 0.8,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
child: SearchBar(
|
||||||
),
|
hintText: "在此搜索...",
|
||||||
label: Text("在此搜索...",
|
leading: const Icon(Icons.search),
|
||||||
style: TextStyle(
|
controller: controller,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
shadowColor: WidgetStateColor.transparent,
|
||||||
)),
|
backgroundColor: WidgetStatePropertyAll(
|
||||||
),
|
Theme.of(context).colorScheme.primaryContainer),
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) => context.go(Uri(
|
||||||
context.go(Uri(
|
|
||||||
path: SearchPage.route,
|
path: SearchPage.route,
|
||||||
queryParameters: {'query': value}).toString());
|
queryParameters: {'query': value}).toString()),
|
||||||
},
|
),
|
||||||
),
|
),
|
||||||
)),
|
);
|
||||||
|
}, suggestionsBuilder:
|
||||||
|
(BuildContext context, SearchController controller) {
|
||||||
|
return [Text("dadada")];
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
|
||||||
actions: [
|
actions: [
|
||||||
// IconButton(
|
// IconButton(
|
||||||
|
|||||||
Reference in New Issue
Block a user