MainNavigationBar constructor

MainNavigationBar({
  1. Key? key,
  2. required String currentNavigation,
  3. required Widget builder(
    1. int index,
    2. void onTap(
      1. int index
      )
    ),
  4. required List<String> navigationPossibilities,
})

navigation refers to the target main navigation path to take.

currentNavigation is currently selected navigation. This will typically come from MainNavigationBloc

the index provided in builder is the currently selected index in navigationPossibilities or 0, if none match.

the function provided in builder is the function that fires the corresponding event up the widget tree. Pass the index of navigationPossibilities that you wish to navigate to.

Implementation

MainNavigationBar(
    {Key? key,
    required this.currentNavigation,
    required this.builder,
    required this.navigationPossibilities})
    : super(key: key) {
  assert(navigationPossibilities.isNotEmpty);
}