bottom_bar_with_sheet 0.3.2

Flutter Android iOS web

This package help you to create bottom bar with FloatingActionButton which buld BottomSheet widget on every page.

bottom_bar_with_sheet #

Build Status License Pub Stars

šŸ’„Non-standard way to use more space of screens in your applicationšŸ’„
šŸ˜³Custom bottom Sheet under Bottom Navigation BaršŸ˜³
šŸ˜©Sounds sucks? šŸ˜‰First of all look at screens!

ImageImageImage

Getting Started #

Add dependency #

dependencies:
  bottom_bar_with_sheet: ^0.3.2

Add import package #

import 'package:bottom_bar_with_sheet/bottom_bar_with_sheet.dart';

Easy to use #

Create a Scaffold widget and set bottomNavigationBar with BottomBarWithSheet like in the code below

Scaffold(
      body: Center(child: Text("Place for your content")),
// -----------------------------------------------------------------------------
      bottomNavigationBar: BottomBarWithSheet(
        selectedIndex: 0,
        sheetChild: Center(child: Text("Place for your another content")),
        bottomBarTheme: BottomBarTheme(
          mainButtonPosition: MainButtonPosition.Middle,
          selectedItemBackgroundColor: const Color(0xFF2B65E3),
        ),
        mainActionButtonTheme: MainActionButtonTheme(
          size: 60,
          color: const Color(0xFF2B65E3),
          icon: Icon(
            Icons.add,
            color: Colors.white,
            size: 35,
          ),
        ),
        onSelectItem: (index) => print('item $index was pressed'),
        items: [
          BottomBarWithSheetItem(icon: Icons.people),
          BottomBarWithSheetItem(icon: Icons.shopping_cart),
          BottomBarWithSheetItem(icon: Icons.settings),
          BottomBarWithSheetItem(icon: Icons.favorite),
        ],
      ),
/// ----------------------------------[end of widget]----------------------------------
    );

Attributes #

AttributeTypeAnnotation
isOpenedboolResponsible for the open / closed state of the widget
sheetChildWidgetthat displayed on bottom of BottomBarWithSheet when isOpened == true
itemsList BottomBarWithSheetItemnavigation buttons of BottomBarWithSheet
bottomBarThemeBottomBarThemetheme of BottomBarWithSheet
mainActionButtonThemeMainActionButtonThemetheme of Main Action Button
onSelectItemFunctionCallback Function works by clicking on one of items Return int index of selected button
selectedIndexintindex of selected BottomBarWithSheetItem from items
durationDurationanimation time of closing / opening BottomBarWithSheet
curveCurvethe style of animation from the suggested ones of Curve
bottomBarMainAxisAlignmentMainAxisAlignmentThe direction in which the widget content will line up

Attributes of BottomBarTheme #

AttributeTypeAnnotation
itemWidthdoublecustom size of BottomBarWithSheetItem's
heightMainActionButtonThemeBottomBarWithSheet height when isOpened == false
heightOpenedMainActionButtonThemeBottomBarWithSheet height when isOpened == true
decorationBoxDecorationdecoration of BottomBarWithSheet
contentPaddingEdgeInsetscreate padding between content of widget and sides
backgroundColorColorBottomBarWithSheet background color
selectedItemIconColorColorselected item icon color
itemIconColorColorunselected item icon color
selectedItemLabelColorColorselected item text color
itemLabelColorColorunselected item text color
selectedItemTextStyleColorselected item text style
itemTextStyleColorunselected item text style
selectedItemBackgroundColorColorselected item icon color
mainButtonPositionenumfiled that response for the position of MainActionButton position this field have 3 possible values: MainButtonPosition.Left, MainButtonPosition.Right , MainButtonPosition.Center

Attributes of MainActionButtonTheme #

AttributeTypeAnnotation
sizedoublesize of button
iconWidgeticon that displayed when the BottomBarWithSheet when isOpened == false
iconOpenedWidgeticon that displayed when the BottomBarWithSheet when isOpened == true
colorColorbackground color of widget circle
splashColorsplash color of widget circle
marginEdgeInsetsside paddings of Main Action Button
transformMatrix4This field can set transform location of Main Action Button



For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

37
likes
110
pub points
73%
popularity

This package help you to create bottom bar with FloatingActionButton which buld BottomSheet widget on every page.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

youngfrezyx@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter, provider

More

Packages that depend on bottom_bar_with_sheet