Я пытаюсь записать несколько child
в flutter
метку body:
тега.
Я новичок в трепетании и не знаю, как сделать несколько детей внутри тега body. это то, что я пробовал.
return new Scaffold(
appBar: AppBar(
leading: new Icon(Icons.live_tv),
title: const Text('SnapNews'),
backgroundColor: Colors.red,
actions: <Widget>[
IconButton(
icon: Icon(Icons.help),
onPressed: () {
Navigator.push(
context, MaterialPageRoute(builder: (_) => Help()));
},
),
],
),
body: new ListView.builder(
itemCount: 10,
itemBuilder: (context, index) {
return new GestureDetector(
onTap: () {
print("tapped");
},
child: new Padding(
padding: const EdgeInsets.all(8.0),
child: new Container(
color: Colors.grey,
height: 100.0,
),
),
);
},
),
floatingActionButton: FloatingActionButton.extended(
elevation: 4.0,
icon: const Icon(Icons.camera_enhance),
label: const Text('Snap'),
backgroundColor: Colors.red,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (_) => CameraScreen()),
);
},
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: BottomAppBar(
child: new Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
IconButton(
icon: Icon(null),
onPressed: () {},
),
IconButton(
icon: Icon(null),
onPressed: () {},
)
],
),
),
);
И это выдает GUI, как показано ниже:
![enter image description here](https://i.stack.imgur.com/Y1sTb.png)
Но я хочу добавить Search Bar
поверх этого ListView
Как это сделать, добавив еще одного ребенка / детей в тег body:
![enter image description here](https://i.stack.imgur.com/Hi0Cs.png)
Спасибо.