我想在相机屏幕选项卡上时隐藏应用程序栏和底部导航栏
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()),
),
),
);
}
答案 0 :(得分:0)
您可以测试以下情况。
Scaffold(
appBar: canShow? AppBar(""):null,
bottomNavigationBar: canShow? BottomNavigationBar(""):null
)