15 Flutter仿京东商城项目 搜索页面布局
2024-09-05 03:40:45
Search.dart
import 'package:flutter/material.dart';
import 'package:flutter_jdshop/services/ScreenAdaper.dart'; class SearchPage extends StatefulWidget {
SearchPage({Key key}) : super(key: key); _SearchPageState createState() => _SearchPageState();
} class _SearchPageState extends State<SearchPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Container(
child: TextField(
autofocus: true,
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(),
borderSide: BorderSide.none)),
),
height: ScreenAdaper.height(),
decoration: BoxDecoration(
color: Color.fromRGBO(, , , 0.8),
borderRadius: BorderRadius.circular()),
),
actions: <Widget>[
InkWell(
child: Container(
height: ScreenAdaper.height(),
width: ScreenAdaper.width(),
child: Row(
children: <Widget>[Text('搜索')],
),
),
onTap: () {},
)
],
),
body: Container(
padding: EdgeInsets.all(),
child: ListView(
children: <Widget>[
Container(
child: Text('热搜', style: Theme.of(context).textTheme.title),
),
Divider(),
Wrap(
children: <Widget>[
Container(
padding: EdgeInsets.all(),
margin: EdgeInsets.all(),
decoration: BoxDecoration(
color: Color.fromRGBO(, , , 0.9),
borderRadius: BorderRadius.circular()),
child: Text('女装'),
),
Container(
padding: EdgeInsets.all(),
margin: EdgeInsets.all(),
decoration: BoxDecoration(
color: Color.fromRGBO(, , , 0.9),
borderRadius: BorderRadius.circular()),
child: Text('女装'),
),
Container(
padding: EdgeInsets.all(),
margin: EdgeInsets.all(),
decoration: BoxDecoration(
color: Color.fromRGBO(, , , 0.9),
borderRadius: BorderRadius.circular()),
child: Text('女装'),
),
Container(
padding: EdgeInsets.all(),
margin: EdgeInsets.all(),
decoration: BoxDecoration(
color: Color.fromRGBO(, , , 0.9),
borderRadius: BorderRadius.circular()),
child: Text('女装'),
),
Container(
padding: EdgeInsets.all(),
margin: EdgeInsets.all(),
decoration: BoxDecoration(
color: Color.fromRGBO(, , , 0.9),
borderRadius: BorderRadius.circular()),
child: Text('女装'),
)
],
),
SizedBox(height: ),
Container(
child: Text('历史记录', style: Theme.of(context).textTheme.title),
),
Divider(),
Column(
children: <Widget>[
ListTile(
title: Text('女装'),
),
Divider(),
ListTile(
title: Text('女装'),
),
Divider(),
ListTile(
title: Text('女装'),
),
Divider(),
ListTile(
title: Text('女装'),
),
Divider(),
],
),
SizedBox(height: ),
InkWell(
onTap: (){ },
child: Container(
width: ScreenAdaper.width(),
height: ScreenAdaper.height(),
decoration: BoxDecoration(
border: Border.all(color: Colors.black54, width: )),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[Icon(Icons.delete), Text('清空历史记录')],
),
),
)
],
),
));
}
}
最新文章
- Linux基础介绍【第七篇】
- 前端试题本(HTML+CSS篇)
- List的FindIndex和ForEach
- 5分钟windows wamp php安装phpunit 2015最新安装实践
- 基础知识《五》---Java多线程的常见陷阱
- Sqoop安装及操作
- 打印W图案
- Activiti的Eclipse插件离线安装指南
- TsFltMgr.sys系统蓝屏的原因就在于QQ电脑管家!
- 低功耗之战!ANT VS Bluetooth LE
- 结对作业-基于GUI的四则运算
- Android执行时ART载入类和方法的过程分析
- Bouml快速使用指南
- jenkins的 git多分支自动构建
- MySQL中and和or的优先级的问题
- oracle(2)
- nio 序列化
- 安全测试&#160;web应用安全测试之XXS跨站脚本攻击检测
- JVM EXCEPTION_ACCESS_VIOLATION
- Activity生命周期详解