Closed Pexeed closed 5 years ago
@Pexeed i try your code. Did not find your issues. Can you provide more codes to me to find out the issues
Sure the build method is the following:
@override
Widget build(BuildContext context) {
if (_viewModel == null)
_viewModel = BarTabSelectionViewModel(context);
return
SafeArea(child:
Scaffold(
resizeToAvoidBottomInset: true,
key: scaffoldKey,
appBar: AppBar(
title: Image.asset('assets/images/logo.png', height: 30,),
backgroundColor: Colors.black,
actions: <Widget>[
IconButton(
icon: Icon(Icons.exit_to_app, color: Colors.white,),
onPressed: _doLogoff,
)
],
),
body: _selectors.elementAt(_selectedIndex),
bottomNavigationBar: BottomNavigationBar(
currentIndex: _selectedIndex,
backgroundColor: Colors.black,
unselectedItemColor: Colors.white,
selectedItemColor: Theme.of(context).accentColor,
onTap: _onItemTapped,
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.dialpad),
title: Text('Comanda')
),
BottomNavigationBarItem(
icon: Icon(Icons.border_all),
title: Text('Lista'),
),
],
),
)
);
}
I just found out the issue, the items: const <BottomNavigationBarItem>
.
I removed const <BottomNavigationBarItem>
and now it works, it's not an issue with the library, sorry and thanks for the quick reply!
Hello,
First thank you for the good library!
I'm facing an issue when trying to set a BottomNavigationBarItem Title.
It throws the following errors:
Using a simple string, such as
Text('Test')
it works.Do you think it's possible to solve this issue?
Thank you!