I want to add a colored BorderSide to the top of my BottomNavigationBar.
I can achieve it using a Custom BottomAppBar, but it is not convenient for my design as it misplaces my floatingActionButtonLocation.centerDocked, so I need to stick with BottomNavigationBar.
Any help to find a workaround is appreciated.
import 'package:flutter/material.dart';
class BottomNavTest extends StatefulWidget {
@override
_BottomNavTestState createState() => _BottomNavTestState();
}
class _BottomNavTestState extends State<BottomNavTest> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey,
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
backgroundColor: Colors.grey,
selectedItemColor: Colors.white,
unselectedItemColor: Colors.black, //
currentIndex: 0,
onTap: (index) {
switch (index) {
case 0:
break;
case 1:
break;
}
},
items: [
BottomNavigationBarItem(
icon: Icon(Icons.thumb_up),
title: Text('good'),
),
BottomNavigationBarItem(
icon: Icon(Icons.thumb_down),
title: Text('bad'),
),
],
),
);
}
}
Current output:
My goal:


