Skip to content

Commit

Permalink
* Now user can handle the body of scaffold widget.
Browse files Browse the repository at this point in the history
* Improved Performance
  • Loading branch information
Mohanraj153 committed Mar 3, 2020
1 parent d8822ca commit 7f72dc2
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 27 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## 1.0.2

* Now user can handle the body of scaffold widget.
* Improved Performance

## 1.0.1

* Now user can handle the body of scaffold widget.

## 1.0.0

* Now user can set alignment and padding to FAB.
* A better way of handling vertical overflows any MenuItem number is now supported.

## 0.0.2

* Fix Some Bugs.

## 0.0.2

* Fix Some Bugs.

## 0.0.1

* TODO: Describe initial release.
* Initial release.
1 change: 1 addition & 0 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
org.gradle.jvmargs=-Xmx1536M

android.enableR8=true
61 changes: 55 additions & 6 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.4.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -29,6 +43,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -47,26 +75,33 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.1"
version: "1.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.5"
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.7"
version: "1.1.8"
path:
dependency: transitive
description:
Expand All @@ -81,6 +116,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
Expand Down Expand Up @@ -134,7 +176,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.5"
version: "0.2.11"
typed_data:
dependency: transitive
description:
Expand All @@ -149,5 +191,12 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
sdks:
dart: ">=2.2.2 <3.0.0"
dart: ">=2.4.0 <3.0.0"
4 changes: 1 addition & 3 deletions example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:flutter_boom_menu_example/main.dart';

void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
//await tester.pumpWidget(MyApp());

// Verify that platform version is retrieved.
expect(
Expand Down
49 changes: 42 additions & 7 deletions lib/src/boom_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ class BoomMenu extends StatefulWidget {
final Color foregroundColor;
final double elevation;
final ShapeBorder fabMenuBorder;
final Alignment fabAlignment;

final double marginLeft;
final double marginRight;
final double marginBottom;

final double fabPaddingLeft;
final double fabPaddingRight;
final double fabPaddingTop;

/// The color of the background overlay.
final Color overlayColor;

Expand Down Expand Up @@ -72,13 +77,17 @@ class BoomMenu extends StatefulWidget {
this.animatedIcon,
this.animatedIconTheme,
this.child,
this.marginBottom = 16,
this.marginBottom = 0,
this.marginLeft = 16,
this.marginRight = 16,
this.marginRight = 0,
this.onOpen,
this.onClose,
this.overlayVisible = false,
this.fabMenuBorder = const CircleBorder(),
this.fabAlignment = Alignment.centerRight,
this.fabPaddingRight = 0,
this.fabPaddingLeft = 0,
this.fabPaddingTop = 0,
this.onPress,
this.animationSpeed = 150
});
Expand Down Expand Up @@ -216,20 +225,46 @@ class _BoomMenuState extends State<BoomMenu> with SingleTickerProviderStateMixin
);

return Positioned(
left: widget.marginLeft - 16,
bottom: widget.marginBottom - 16,
right: widget.marginRight - 16,
left: widget.marginLeft + 16,
bottom: widget.marginBottom,
right: widget.marginRight,
child: Container(
alignment: Alignment.bottomCenter,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: List.from(fabChildren)
/*children: List.from(fabChildren)
..add(
Container(
margin: EdgeInsets.only(top: 8.0, right: 2.0),
child: animatedFloatingButton,
),
),*/
children: <Widget> [
SizedBox(height: kToolbarHeight + 40),
Visibility(
visible: _open,
child: Expanded(
child: ListView(
children: List.from(fabChildren),
reverse: true,
),
),
),
Align(
alignment: widget.fabAlignment,
child: Container(
padding: EdgeInsets.only(
left: widget.fabPaddingLeft,
right: widget.fabPaddingRight,
top: 8.0 + widget.fabPaddingTop,
),
child: animatedFloatingButton,
),
),
],
),
),
);
Expand All @@ -238,7 +273,7 @@ class _BoomMenuState extends State<BoomMenu> with SingleTickerProviderStateMixin
@override
Widget build(BuildContext context) {
final children = [
if (!widget.overlayVisible) _renderOverlay(),
!widget.overlayVisible ? _renderOverlay() : Container(),
_renderButton(),
];

Expand Down
59 changes: 54 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.4.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -29,6 +43,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -39,20 +67,27 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.5"
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.7"
version: "1.1.8"
path:
dependency: transitive
description:
Expand All @@ -67,6 +102,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
Expand Down Expand Up @@ -120,7 +162,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.5"
version: "0.2.11"
typed_data:
dependency: transitive
description:
Expand All @@ -135,5 +177,12 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
sdks:
dart: ">=2.2.2 <3.0.0"
dart: ">=2.4.0 <3.0.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_boom_menu
description: Flutter plugin to implement a Boom Menu, with icons, title, sub title, animated FAB Icon and hide on scrolling.
version: 0.0.2
version: 1.0.2
author:
Mohanraj <[email protected]>
Ralph Noel Bruno <[email protected]>
Expand Down
4 changes: 0 additions & 4 deletions test/flutter_boom_menu_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_boom_menu/flutter_boom_menu.dart';

void main() {

}

0 comments on commit 7f72dc2

Please sign in to comment.