Skip to content

Commit 48a7164

Browse files
authored
Merge pull request #60 from Frezyx/dev
Release version 2.4.0
2 parents 3b77151 + 21b3372 commit 48a7164

34 files changed

+287
-541
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.4.0
2+
- **BREAKING**: Remove **isOpened**, **selectedIndex**, **mainActionButton** fields
3+
- **BREAKING**: Remove outside position
4+
- **INFO**: Update examples and create new usecase example
5+
- **INFO**: Update README with thanks for [Nivin389](https://github.com/Nivin389)
6+
17
## 2.3.1
28
- **INFO**: Fix examples in example folder
39

README.md

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@
55
[![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)
66
![Stars](https://img.shields.io/github/stars/Frezyx/bottom_bar_with_sheet?style=social)
77
</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+
814

915

1016
💥Non-standard way to use more space of screens in your application💥<br>
1117
😳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!
1319

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+
| :------------: | :------------: | :------------: | :------------: |
1622

1723

1824
## Table of Content
@@ -30,7 +36,7 @@
3036

3137
```yaml
3238
dependencies:
33-
bottom_bar_with_sheet: ^2.3.1
39+
bottom_bar_with_sheet: ^2.4.0
3440
```
3541
3642
### Add import package
@@ -45,34 +51,18 @@ Create a **Scaffold** widget and set **bottomNavigationBar** with **BottomBarWit
4551

4652
```dart
4753
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+
);
7666
```
7767

7868
**More examples you can see** [here](https://github.com/Frezyx/bottom_bar_with_sheet/tree/master/example/lib)
@@ -83,19 +73,17 @@ Scaffold(
8373

8474
| Attribute | Type | Annotation |
8575
| ------------- | ------------- | ------------- |
86-
| isOpened | bool | Responsible for the open / closed state of the widget |
8776
| autoClose | bool | If true the [BottomBarWithSheetItem]'s DO NOT automatically close the child sheet when pressed |
8877
| disableMainActionButton | bool | disable MainActionButton if true , enable if false |
8978
| sheetChild | Widget | that displayed on bottom of **BottomBarWithSheet** when **isOpened** == true |
9079
| items | List BottomBarWithSheetItem | navigation buttons of **BottomBarWithSheet** |
9180
| bottomBarTheme | BottomBarTheme | theme of **BottomBarWithSheet** |
9281
| mainActionButtonTheme | MainActionButtonTheme | theme of **Main Action Button** |
9382
| 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** |
9583
| duration | Duration | animation time of closing / opening **BottomBarWithSheet** |
9684
| curve | Curve | the style of animation from the suggested ones of **Curve** |
9785
| 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 |
9987
---
10088
## Attributes of BottomBarTheme
10189

example/lib/examples/custom_main_action_button.dart

Lines changed: 0 additions & 68 deletions
This file was deleted.

example/lib/examples/fab_outside_bottom_bar.dart

Lines changed: 0 additions & 121 deletions
This file was deleted.

example/lib/examples/left_button.dart

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import 'package:bottom_bar_with_sheet/bottom_bar_with_sheet.dart';
22
import 'package:flutter/material.dart';
33

4-
void main() => runApp(const MyApp());
4+
void main() => runApp(const LeftButtonExample());
55

6-
class MyApp extends StatelessWidget {
7-
const MyApp({Key? key}) : super(key: key);
6+
class LeftButtonExample extends StatelessWidget {
7+
const LeftButtonExample({Key? key}) : super(key: key);
88

99
@override
1010
Widget build(BuildContext context) {
@@ -23,8 +23,6 @@ class MyHomePage extends StatefulWidget {
2323
}
2424

2525
class _MyHomePageState extends State<MyHomePage> {
26-
int _selectedIndex = 0;
27-
2826
@override
2927
Widget build(BuildContext context) {
3028
return Scaffold(
@@ -40,7 +38,6 @@ class _MyHomePageState extends State<MyHomePage> {
4038
),
4139
),
4240
bottomNavigationBar: BottomBarWithSheet(
43-
selectedIndex: _selectedIndex,
4441
autoClose: false,
4542
sheetChild: Center(
4643
child: Text(
@@ -56,13 +53,12 @@ class _MyHomePageState extends State<MyHomePage> {
5653
height: 70,
5754
heightClosed: 70,
5855
heightOpened: 300,
59-
backgroundColor: Colors.grey[900],
6056
mainButtonPosition: MainButtonPosition.left,
6157
selectedItemIconColor: Colors.green,
6258
itemIconColor: Colors.white,
63-
selectedItemIconSize: 20,
64-
decoration: const BoxDecoration(
65-
borderRadius: BorderRadius.only(
59+
decoration: BoxDecoration(
60+
color: Colors.grey[900],
61+
borderRadius: const BorderRadius.only(
6662
topLeft: Radius.circular(30.0),
6763
),
6864
),
@@ -77,7 +73,6 @@ class _MyHomePageState extends State<MyHomePage> {
7773
size: 35,
7874
),
7975
),
80-
onSelectItem: (index) => setState(() => _selectedIndex = index),
8176
items: const [
8277
BottomBarWithSheetItem(icon: Icons.home_rounded),
8378
BottomBarWithSheetItem(icon: Icons.shopping_cart),

0 commit comments

Comments
 (0)