gpt4 book ai didi

flutter - 如何在操作栏上有两个搜索栏?

转载 作者:行者123 更新时间:2023-12-03 04:54:46 27 4
gpt4 key购买 nike

实现以下图像的正确方法是什么?

enter image description here

我在appBar中添加列和行,但是得到这个

enter image description here

 @override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
preferredSize: Size.fromHeight(150.0),
child: AppBar(
title: Column(
children: <Widget>[
Row(children: <Widget>[Icon(Icons.access_alarm), Text("idwidjow")]),
SizedBox(
height: 20,
),
Row(
children: <Widget>[Icon(Icons.access_alarm), Text("idwidjow")],
)
],
)),
));
}

最佳答案

如何尝试这样的事情...尽管您将不得不完成设计

appBar: PreferredSize(
preferredSize: Size.fromHeight(150.0),
child: AppBar(
flexibleSpace: Column(
children: <Widget>[
Row(
children: <Widget>[
Container(
child: Icon(Icons.arrow_back),
width: 50,
),
Icon(Icons.person),
Flexible(
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12.0)),
),
))),
Icon(Icons.arrow_back)
],
),
Row(
children: <Widget>[
SizedBox(width: 50),
Icon(Icons.person),
Flexible(
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12.0)),
),
),
)),
Icon(Icons.arrow_back)
],
)
],
),
),
)

输出量

enter image description here

关于flutter - 如何在操作栏上有两个搜索栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60788852/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com