Want to make blank app bar for one screen instead of app bar with logo title depending on the situation (mainly when using bottom navigation). But appBar() can't be replace with container() widget. How should I do?
Eg.. If bottom navigation bar Index become 0, app bar will disappear although for other Index app bar will appear.
Below is the code snippet with logo appbar
appBar: AppBar(
centerTitle: true,
title: Image.asset(
'assets/fblogosmall300.png',
fit: BoxFit.contain,
height: 45,
),
flexibleSpace: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: <Color>[secondColor, mainColor])),
),
),
What I expected is, but completely get error.
appBar: currentIndex == 4? Container():AppBar(
centerTitle: true,
title: Image.asset(
'assets/fblogosmall300.png',
fit: BoxFit.contain,
height: 45,
),
flexibleSpace: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: <Color>[secondColor, mainColor])),
),
),