符合中小企业对网站设计、功能常规化式的企业展示型网站建设
本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...
商城网站建设因基本功能的需求不同费用上面也有很大的差别...
手机微信网站开发、微信官网、微信商城网站...
class SearchBar extends StatefulWidget {
SearchBar({Key? key, this.onChanged}) : super(key: key);
final ValueChanged? onChanged;
@override
_SearchBarState createState() =>_SearchBarState();
}
class _SearchBarState extends State{
final TextEditingController _textEditingController = TextEditingController();
List_models = [];
bool _showClear = false;
void _onChanged(String text) {
if (widget.onChanged != null) {
widget.onChanged!(text);
}
setState(() {
_showClear = text.isNotEmpty;
});
}
@override
Widget build(BuildContext context) {
return Container(
height: 84,
color: Colors.indigoAccent,
child: Column(
children: [
const SizedBox(
height: 40,
),
SizedBox(
height: 44,
child: Row(
children: [
Container(
width: 400,
height: 34,
margin: const EdgeInsets.only(left: 5, right: 5),
padding: const EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6.0),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: TextField(
controller: _textEditingController,
cursorColor: Colors.green,
autofocus: true,
onChanged: _onChanged,
style: const TextStyle(
fontSize: 18.0,
color: Colors.black,
fontWeight: FontWeight.w300,
),
decoration: const InputDecoration(
contentPadding: EdgeInsets.only(left: 5,bottom: 10),
border:InputBorder.none,
hintText:'搜索',
),
),
),
if (_showClear) GestureDetector(
child: const Icon(
Icons.cancel,
size: 20,
color: Colors.grey,
),
onTap: () {
_textEditingController.clear();
setState(() {
_onChanged("");
});
},
)
],
),
), //圆角背景
GestureDetector(
child: const Text('取消'),
onTap: () {
},
),
],
),
),
],
),
);
}
}
你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧