gpt4 book ai didi

flutter - 我在摄像头屏幕选项卡上时想隐藏应用程序栏和底部导航栏

转载 作者:行者123 更新时间:2023-12-03 03:50:41 26 4
gpt4 key购买 nike

在摄像头屏幕选项卡上时,我想隐藏应用程序栏和底部导航栏

Widget build(BuildContext context) {
return new WillPopScope(
onWillPop: () async => false,
child: GestureDetector(
child: Scaffold(
appBar: AppBar(
title: Padding(
padding: const EdgeInsets.only(left: 200.0),
child: Text("techstagram",
style: TextStyle(color: Colors.deepPurple)),
),
backgroundColor: Colors.white,
// backgroundColor: Colors.white,
leading: IconButton(
icon: Icon(
Icons.search,
color: Colors.deepPurple,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SearchListExample()),
);
},
),

actions: <Widget>[
Padding(
padding: const EdgeInsets.only(right: 180.0, top: 15.0),
child: Text(
'Hashtag',
style: TextStyle(
color: Colors.deepPurple,
fontSize: 20.0,
fontWeight: FontWeight.bold),
),
),
IconButton(
icon: Icon(
Icons.message,
color: Colors.deepPurple,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ConversationPage()),
);
},
),
],
),
body: ResponsiveLayoutBuilder(
builder: (context, size) => new TabLayoutDemo()),
),
),
);
}

最佳答案

您可以按以下方式测试条件。

Scaffold(
appBar: canShow? AppBar(""):null,
bottomNavigationBar: canShow? BottomNavigationBar(""):null
)

关于flutter - 我在摄像头屏幕选项卡上时想隐藏应用程序栏和底部导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63548862/

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