5
5
[ ![ Build Status] ( https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FFrezyx%2Fbottom_bar_with_sheet%2Fbadge%3Fref%3Dmaster&style=flat )] ( https://actions-badge.atrox.dev/Frezyx/bottom_bar_with_sheet/goto?ref=master ) [ ![ License] ( https://img.shields.io/github/license/Frezyx/bottom_bar_with_sheet )] ( https://opensource.org/licenses/MIT ) [ ![ Pub] ( https://img.shields.io/pub/v/bottom_bar_with_sheet.svg )] ( https://pub.dartlang.org/packages/bottom_bar_with_sheet )
6
6
![ Stars] ( https://img.shields.io/github/stars/Frezyx/bottom_bar_with_sheet?style=social )
7
7
</p >
8
+ <p >
9
+ <a href =" https://pub.dev/packages/bottom_bar_with_sheet/score " ><img src =" https://badges.bar/bottom_bar_with_sheet/likes " alt =" Pub likes " ></a >
10
+ <a href =" https://pub.dev/packages/bottom_bar_with_sheet/score " ><img src =" https://badges.bar/bottom_bar_with_sheet/popularity " alt =" Pub popularity " ></a >
11
+ <a href =" https://pub.dev/packages/bottom_bar_with_sheet/score " ><img src =" https://badges.bar/bottom_bar_with_sheet/pub%20points " alt =" Pub points " ></a >
12
+ </p >
13
+
8
14
9
15
10
16
💥Non-standard way to use more space of screens in your application💥<br >
11
17
😳Custom bottom Sheet under Bottom Navigation Bar😳<br >
12
- 😩Sounds sucks? 😉First of all look at screens!
18
+ 😩Sounds sucks? 😉 First of all look at screens!
13
19
14
- | ![ Image] ( https://github.com/Frezyx/bottom_bar_with_sheet/blob/master/example/rep_files/examples/left_button .gif?raw=true ) | ![ Image] ( https://github.com/Frezyx/bottom_bar_with_sheet/blob/master/example/rep_files/examples/main .gif?raw=true ) | ![ Image] ( https://github.com/Frezyx/bottom_bar_with_sheet/blob/master/example/rep_files/examples/right_button .gif?raw=true ) |
15
- | :------------: | :------------: | :------------: |
20
+ | ![ Image] ( https://github.com/Frezyx/bottom_bar_with_sheet/blob/master/example/rep_files/e1 .gif?raw=true ) | ![ Image] ( https://github.com/Frezyx/bottom_bar_with_sheet/blob/master/example/rep_files/e2 .gif?raw=true ) | ![ Image] ( https://github.com/Frezyx/bottom_bar_with_sheet/blob/master/example/rep_files/e3.gif?raw=true ) | ![ Image ] ( https://github.com/Frezyx/bottom_bar_with_sheet/blob/master/example/rep_files/e4 .gif?raw=true) |
21
+ | :------------: | :------------: | :------------: | :------------: |
16
22
17
23
18
24
## Table of Content
30
36
31
37
``` yaml
32
38
dependencies :
33
- bottom_bar_with_sheet : ^2.3.1
39
+ bottom_bar_with_sheet : ^2.4.0
34
40
` ` `
35
41
36
42
### Add import package
@@ -45,34 +51,18 @@ Create a **Scaffold** widget and set **bottomNavigationBar** with **BottomBarWit
45
51
46
52
``` dart
47
53
Scaffold(
48
- body: Center(child: Text("Place for your content")),
49
- // -----------------------------------------------------------------------------
50
- bottomNavigationBar: BottomBarWithSheet(
51
- selectedIndex: 0,
52
- sheetChild: Center(child: Text("Place for your another content")),
53
- bottomBarTheme: BottomBarTheme(
54
- mainButtonPosition: MainButtonPosition.middle,
55
- selectedItemBackgroundColor: const Color(0xFF2B65E3),
56
- ),
57
- mainActionButtonTheme: MainActionButtonTheme(
58
- size: 60,
59
- color: const Color(0xFF2B65E3),
60
- icon: Icon(
61
- Icons.add,
62
- color: Colors.white,
63
- size: 35,
64
- ),
65
- ),
66
- onSelectItem: (index) => print('item $index was pressed'),
67
- items: [
68
- BottomBarWithSheetItem(icon: Icons.people),
69
- BottomBarWithSheetItem(icon: Icons.shopping_cart),
70
- BottomBarWithSheetItem(icon: Icons.settings),
71
- BottomBarWithSheetItem(icon: Icons.favorite),
72
- ],
73
- ),
74
- /// ----------------------------------[end of widget]----------------------------------
75
- );
54
+ bottomNavigationBar: BottomBarWithSheet(
55
+ controller: _bottomBarController,
56
+ bottomBarTheme: const BottomBarTheme(
57
+ decoration: BoxDecoration(color: Colors.white),
58
+ itemIconColor: Colors.grey,
59
+ ),
60
+ items: const [
61
+ BottomBarWithSheetItem(icon: Icons.people),
62
+ BottomBarWithSheetItem(icon: Icons.favorite),
63
+ ],
64
+ ),
65
+ );
76
66
```
77
67
78
68
** More examples you can see** [ here] ( https://github.com/Frezyx/bottom_bar_with_sheet/tree/master/example/lib )
@@ -83,19 +73,17 @@ Scaffold(
83
73
84
74
| Attribute | Type | Annotation |
85
75
| ------------- | ------------- | ------------- |
86
- | isOpened | bool | Responsible for the open / closed state of the widget |
87
76
| autoClose | bool | If true the [ BottomBarWithSheetItem] 's DO NOT automatically close the child sheet when pressed |
88
77
| disableMainActionButton | bool | disable MainActionButton if true , enable if false |
89
78
| sheetChild | Widget | that displayed on bottom of ** BottomBarWithSheet** when ** isOpened** == true |
90
79
| items | List BottomBarWithSheetItem | navigation buttons of ** BottomBarWithSheet** |
91
80
| bottomBarTheme | BottomBarTheme | theme of ** BottomBarWithSheet** |
92
81
| mainActionButtonTheme | MainActionButtonTheme | theme of ** Main Action Button** |
93
82
| onSelectItem | Function | Callback ** Function** works by clicking on one of ** items** Return int ** index** of selected button |
94
- | selectedIndex | int | index of selected ** BottomBarWithSheetItem** from ** items** |
95
83
| duration | Duration | animation time of closing / opening ** BottomBarWithSheet** |
96
84
| curve | Curve | the style of animation from the suggested ones of ** Curve** |
97
85
| bottomBarMainAxisAlignment | MainAxisAlignment | The direction in which the widget content will line up |
98
- | mainActionButton | MainActionButton | Custom version of Main Action Button |
86
+ | mainActionButtonBuilder | MainActionButton | Custom version of Main Action Button |
99
87
---
100
88
## Attributes of BottomBarTheme
101
89
0 commit comments