mod: 首页样式

This commit is contained in:
guozhigq
2024-01-07 20:15:39 +08:00
parent 8ebb4cc70e
commit 042a0a848d
3 changed files with 186 additions and 170 deletions

View File

@ -54,48 +54,49 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
openShape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(30.0))),
closedBuilder: (BuildContext context, VoidCallback openContainer) {
return IconButton(onPressed: openContainer, icon: Icon(Icons.search));
// return Container(
// width: 250,
// height: 44,
// clipBehavior: Clip.hardEdge,
// decoration: const BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(25)),
// ),
// child: Material(
// color:
// Theme.of(context).colorScheme.secondaryContainer.withAlpha(115),
// child: InkWell(
// splashColor: Theme.of(context)
// .colorScheme
// .primaryContainer
// .withOpacity(0.3),
// onTap: openContainer,
// child: Row(
// children: [
// const SizedBox(width: 14),
// Icon(
// Icons.search_outlined,
// color: Theme.of(context).colorScheme.onSecondaryContainer,
// ),
// const SizedBox(width: 10),
// Expanded(
// child: Obx(
// () => Text(
// _searchController.defaultSearch.value,
// maxLines: 1,
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// color: Theme.of(context).colorScheme.outline,
// ),
// ),
// ),
// ),
// ],
// ),
// ),
// ),
// );
return Container(
width: 250,
height: 44,
clipBehavior: Clip.hardEdge,
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(25)),
),
child: Material(
color: Theme.of(context)
.colorScheme
.onSecondaryContainer
.withOpacity(0.05),
child: InkWell(
splashColor: Theme.of(context)
.colorScheme
.primaryContainer
.withOpacity(0.3),
onTap: openContainer,
child: Row(
children: [
const SizedBox(width: 14),
Icon(
Icons.search_outlined,
color: Theme.of(context).colorScheme.onSecondaryContainer,
),
const SizedBox(width: 10),
Expanded(
child: Obx(
() => Text(
_searchController.defaultSearch.value,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Theme.of(context).colorScheme.outline,
),
),
),
),
],
),
),
),
);
},
openBuilder: (BuildContext context, VoidCallback _) {
return Scaffold(