Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

convex_bottomappbar

this package extends the official bottomappbar to display a convex tab, example can be preview as bellow.

currently the bottomappbar can only display a notch fab with app bar, sometimes we need a convex fab.

bottomappbar flutter

install demo app-release.apk

how to use

to use convexappbar, follow these steps to setup scaffold:

  1. add fab with floatingactionbutton
  2. center the fab with floatingactionbuttonlocation
  3. setup app bar by bottomnavigationbar

the convexappbar has to two constructors, the convexappbar() will use default layout to simplify the tab creation.

scaffold(
  appbar: appbar(
    title: const text('default convexappbar'),
  ),
  body: center(
    child: text('tab $_selectedindex', style: textstyle(fontsize: 20)),
  ),
  floatingactionbutton: convexappbar.fab(
    text: 'publish',
    active: _selectedindex == index_publish,
    activecolor: active_color,
    color: normal_color,
    ontap: () => ontabselected(index_publish),
  ),
  floatingactionbuttonlocation: convexappbar.centerdocked,
  bottomnavigationbar: convexappbar(
    items: tab_items,
    index: _selectedindex,
    activecolor: active_color,
    color: normal_color,
    ontap: ontabselected,
  ),
)

custom

if the default style does not match with your situation, try with convexappbar.builder(), which allow you to custom nearly all the tab features.

scaffold(
  appbar: appbar(title: const text('custom convexappbar')),
  body: palettebody(),
  floatingactionbutton: gesturedetector(
    ontap: () => _onitemtapped(index_publish),
    child: fabcontent(convexcolor),
  ),
  floatingactionbuttonlocation: convexappbar.centerdocked,
  bottomnavigationbar: convexappbar.builder(
      count: 5,
      backgroundcolor: _tabbackgroundcolor,
      builder: (buildcontext context, int index) {
        var data = _navigationitems[index];
        var color = _currentindex == index ? colors.white : colors.white60;
        return gesturedetector(
            ontap: () => _onitemtapped(index),
            child: tabcontent(data, color));
      }),
);

example

for more detail, please refer to the example project


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.