Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Adding an attribute to skip the margin offset for the fab #27

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ build/
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

**/example/ios/Flutter/flutter_export_environment.sh

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
pubspec_overrides.yaml
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
## 1.1.0

- Graduate package to a stable release. See pre-releases prior to this version for changelog entries.

## 1.1.0-dev.6

- **FEAT**: Cleaning up for melos publish.
- **FEAT**: bumping version.

## 1.1.0-dev.5

- **FEAT**: Cleaning up for melos publish.
- **FEAT**: bumping version.

## 1.1.0-dev.4

- **FEAT**: Cleaning up for melos publish.
- **FEAT**: bumping version.

## 1.1.0-dev.3

- **FEAT**: Cleaning up for melos publish.
- **FEAT**: bumping version.

## 1.1.0-dev.2

- **FEAT**: Cleaning up for melos publish.
- **FEAT**: bumping version.

## 1.1.0-dev.1

- **FEAT**: Cleaning up for melos publish.
- **FEAT**: bumping version.

## 1.1.0-dev.0

- **FEAT**: bumping version.

## 1.0.2
* Null safety
* Changed the children count requirement to 1 from 2
Expand Down
18 changes: 0 additions & 18 deletions example/ios/Flutter/Flutter.podspec

This file was deleted.

13 changes: 0 additions & 13 deletions example/ios/Flutter/flutter_export_environment.sh

This file was deleted.

31 changes: 16 additions & 15 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ void main() {
}

class MyApp extends StatelessWidget {

final GlobalKey<FabCircularMenuState> fabKey = GlobalKey();

@override
Expand All @@ -19,17 +18,20 @@ class MyApp extends StatelessWidget {
body: Container(
color: const Color(0xFF192A56),
child: Center(
child: RaisedButton(
child: ElevatedButton(
onPressed: () {
// The menu can be handled programatically using a key
if (fabKey.currentState.isOpen) {
fabKey.currentState.close();
if (fabKey.currentState!.isOpen) {
fabKey.currentState!.close();
} else {
fabKey.currentState.open();
fabKey.currentState!.open();
}
},
color: Colors.white,
child: Text('Toggle menu programatically', style: TextStyle(color: primaryColor)),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.white),
),
child: Text('Toggle menu programatically',
style: TextStyle(color: primaryColor)),
),
),
),
Expand All @@ -56,7 +58,8 @@ class MyApp extends StatelessWidget {
animationDuration: const Duration(milliseconds: 800),
animationCurve: Curves.easeInOutCirc,
onDisplayChange: (isOpen) {
_showSnackBar(context, "The menu is ${isOpen ? "open" : "closed"}");
_showSnackBar(
context, "The menu is ${isOpen ? "open" : "closed"}");
},
children: <Widget>[
RawMaterialButton(
Expand Down Expand Up @@ -85,8 +88,9 @@ class MyApp extends StatelessWidget {
),
RawMaterialButton(
onPressed: () {
_showSnackBar(context, "You pressed 4. This one closes the menu on tap");
fabKey.currentState.close();
_showSnackBar(context,
"You pressed 4. This one closes the menu on tap");
fabKey.currentState!.close();
},
shape: CircleBorder(),
padding: const EdgeInsets.all(24.0),
Expand All @@ -100,12 +104,9 @@ class MyApp extends StatelessWidget {
}

void _showSnackBar(BuildContext context, String message) {
Scaffold.of(context).showSnackBar(
SnackBar(
Scaffold.of(context).showSnackBar(SnackBar(
content: Text(message),
duration: const Duration(milliseconds: 1000),
)
);
));
}

}
131 changes: 75 additions & 56 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,68 @@
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
dependency: "direct overridden"
description:
name: async
url: "https://pub.dartlang.org"
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.5.0"
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
dependency: "direct overridden"
description:
name: collection
url: "https://pub.dartlang.org"
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.17.2"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
url: "https://pub.dev"
source: hosted
version: "0.1.3"
version: "1.0.5"
fab_circular_menu:
dependency: "direct main"
description:
path: ".."
relative: true
path: "/Users/ericm/aesthetika/checkout/SunnyApp/fab-circular-menu"
relative: false
source: path
version: "1.0.1"
version: "1.1.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.1"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -74,27 +74,46 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: "direct overridden"
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.7"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
version: "0.12.10"
meta:
version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "586678f20e112219ed0f73215f01bcdf1d769824ba2ebae45ad918a9bfde9bdb"
url: "https://pub.dev"
source: hosted
version: "0.3.0"
meta:
dependency: "direct overridden"
description:
name: meta
url: "https://pub.dartlang.org"
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.9.1"
path:
dependency: transitive
dependency: "direct overridden"
description:
name: path
url: "https://pub.dartlang.org"
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.8.3"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -104,57 +123,57 @@ packages:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.10.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
sha256: daadc9baabec998b062c9091525aa95786508b1c48e9c30f1f891b8bf6ff2e64
url: "https://pub.dev"
source: hosted
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "0.5.2"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.4"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=3.0.0-0 <4.0.0"
Loading