Skip to content

Commit

Permalink
Merge pull request #60 from Frezyx/dev
Browse files Browse the repository at this point in the history
Release version 2.4.0
  • Loading branch information
Frezyx authored May 2, 2022
2 parents 3b77151 + 21b3372 commit 48a7164
Show file tree
Hide file tree
Showing 34 changed files with 287 additions and 541 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.4.0
- **BREAKING**: Remove **isOpened**, **selectedIndex**, **mainActionButton** fields
- **BREAKING**: Remove outside position
- **INFO**: Update examples and create new usecase example
- **INFO**: Update README with thanks for [Nivin389](https://github.com/Nivin389)

## 2.3.1
- **INFO**: Fix examples in example folder

Expand Down
58 changes: 23 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@
[![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)
![Stars](https://img.shields.io/github/stars/Frezyx/bottom_bar_with_sheet?style=social)
</p>
<p>
<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>
<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>
<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>
</p>



💥Non-standard way to use more space of screens in your application💥<br>
😳Custom bottom Sheet under Bottom Navigation Bar😳<br>
😩Sounds sucks? 😉First of all look at screens!
😩Sounds sucks? 😉 First of all look at screens!

| ![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) |
| :------------: | :------------: | :------------: |
| ![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) |
| :------------: | :------------: | :------------: | :------------: |


## Table of Content
Expand All @@ -30,7 +36,7 @@

```yaml
dependencies:
bottom_bar_with_sheet: ^2.3.1
bottom_bar_with_sheet: ^2.4.0
```
### Add import package
Expand All @@ -45,34 +51,18 @@ Create a **Scaffold** widget and set **bottomNavigationBar** with **BottomBarWit

```dart
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]----------------------------------
);
bottomNavigationBar: BottomBarWithSheet(
controller: _bottomBarController,
bottomBarTheme: const BottomBarTheme(
decoration: BoxDecoration(color: Colors.white),
itemIconColor: Colors.grey,
),
items: const [
BottomBarWithSheetItem(icon: Icons.people),
BottomBarWithSheetItem(icon: Icons.favorite),
],
),
);
```

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

| Attribute | Type | Annotation |
| ------------- | ------------- | ------------- |
| isOpened | bool | Responsible for the open / closed state of the widget |
| autoClose | bool | If true the [BottomBarWithSheetItem]'s DO NOT automatically close the child sheet when pressed |
| disableMainActionButton | bool | disable MainActionButton if true , enable if false |
| sheetChild | Widget | that displayed on bottom of **BottomBarWithSheet** when **isOpened** == true |
| items | List BottomBarWithSheetItem | navigation buttons of **BottomBarWithSheet** |
| bottomBarTheme | BottomBarTheme | theme of **BottomBarWithSheet** |
| mainActionButtonTheme | MainActionButtonTheme | theme of **Main Action Button** |
| onSelectItem | Function | Callback **Function** works by clicking on one of **items** Return int **index** of selected button |
| selectedIndex | int | index of selected **BottomBarWithSheetItem** from **items** |
| duration | Duration | animation time of closing / opening **BottomBarWithSheet** |
| curve | Curve | the style of animation from the suggested ones of **Curve** |
| bottomBarMainAxisAlignment | MainAxisAlignment | The direction in which the widget content will line up |
| mainActionButton | MainActionButton | Custom version of Main Action Button |
| mainActionButtonBuilder | MainActionButton | Custom version of Main Action Button |
---
## Attributes of BottomBarTheme

Expand Down
68 changes: 0 additions & 68 deletions example/lib/examples/custom_main_action_button.dart

This file was deleted.

121 changes: 0 additions & 121 deletions example/lib/examples/fab_outside_bottom_bar.dart

This file was deleted.

17 changes: 6 additions & 11 deletions example/lib/examples/left_button.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:bottom_bar_with_sheet/bottom_bar_with_sheet.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());
void main() => runApp(const LeftButtonExample());

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
class LeftButtonExample extends StatelessWidget {
const LeftButtonExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand All @@ -23,8 +23,6 @@ class MyHomePage extends StatefulWidget {
}

class _MyHomePageState extends State<MyHomePage> {
int _selectedIndex = 0;

@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -40,7 +38,6 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
bottomNavigationBar: BottomBarWithSheet(
selectedIndex: _selectedIndex,
autoClose: false,
sheetChild: Center(
child: Text(
Expand All @@ -56,13 +53,12 @@ class _MyHomePageState extends State<MyHomePage> {
height: 70,
heightClosed: 70,
heightOpened: 300,
backgroundColor: Colors.grey[900],
mainButtonPosition: MainButtonPosition.left,
selectedItemIconColor: Colors.green,
itemIconColor: Colors.white,
selectedItemIconSize: 20,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
decoration: BoxDecoration(
color: Colors.grey[900],
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(30.0),
),
),
Expand All @@ -77,7 +73,6 @@ class _MyHomePageState extends State<MyHomePage> {
size: 35,
),
),
onSelectItem: (index) => setState(() => _selectedIndex = index),
items: const [
BottomBarWithSheetItem(icon: Icons.home_rounded),
BottomBarWithSheetItem(icon: Icons.shopping_cart),
Expand Down
Loading

0 comments on commit 48a7164

Please sign in to comment.