【发布时间】:2020-11-29 21:41:57
【问题描述】:
我正在尝试,但我不知道该怎么做
我想摆脱绿盒空间。 我尝试使用 PreferedSize 小部件,但它不起作用我的代码是...
@override
Widget build(BuildContext context) {
return SafeArea(
child: PreferredSize(
preferredSize: Size.fromHeight(SizeConfig.heightMultiplier * 6.2),
// it's pretty narrow size but doesn't work in this screen but others
child: Scaffold(
appBar: AppBar(
centerTitle: true,
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'hello',
style: TextStyle(fontWeight: FontWeight.bold),
),
Text(
'world',
),
Text(
'!',
style: TextStyle(fontWeight: FontWeight.bold),
),
],
),
actions: <Widget>[
Icon(
Icons.add,
color: Colors.transparent,
),
],
backgroundColor: Theme.of(context).primaryColor,
bottom: TabBar(
controller: tabController,
indicatorColor: Colors.white,
tabs: myTabs,
),
),
...
我需要你的帮助☑
【问题讨论】:
标签: flutter padding space tabbar appbar