From 85aa86a4309d463dbf52fd1fe2c92702c0f3c2e7 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Tue, 10 Nov 2020 08:41:44 -0700 Subject: [PATCH 01/16] Adding an attribute to skip the margin offset for the fab --- lib/fab_circular_menu.dart | 91 +++++++++++++------------------------- 1 file changed, 31 insertions(+), 60 deletions(-) diff --git a/lib/fab_circular_menu.dart b/lib/fab_circular_menu.dart index c68f5c2..e3d599d 100644 --- a/lib/fab_circular_menu.dart +++ b/lib/fab_circular_menu.dart @@ -1,4 +1,5 @@ import 'dart:math'; + import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:vector_math/vector_math.dart' as vector; @@ -35,6 +36,7 @@ class FabCircularMenu extends StatefulWidget { this.fabElevation = 8.0, this.fabColor, this.fabOpenColor, + this.removeDefaultFabMargin = true, this.fabCloseColor, this.fabIconBorder, this.fabChild, @@ -52,8 +54,7 @@ class FabCircularMenu extends StatefulWidget { FabCircularMenuState createState() => FabCircularMenuState(); } -class FabCircularMenuState extends State - with SingleTickerProviderStateMixin { +class FabCircularMenuState extends State with SingleTickerProviderStateMixin { late double _screenWidth; late double _screenHeight; late double _marginH; @@ -86,26 +87,19 @@ class FabCircularMenuState extends State void initState() { super.initState(); - _animationController = - AnimationController(duration: widget.animationDuration, vsync: this); - - _scaleCurve = CurvedAnimation( - parent: _animationController, - curve: Interval(0.0, 0.4, curve: widget.animationCurve)); - _scaleAnimation = Tween(begin: 0.0, end: 1.0) - .animate(_scaleCurve as Animation) - ..addListener(() { - setState(() {}); - }); - - _rotateCurve = CurvedAnimation( - parent: _animationController, - curve: Interval(0.4, 1.0, curve: widget.animationCurve)); - _rotateAnimation = Tween(begin: 0.5, end: 1.0) - .animate(_rotateCurve as Animation) - ..addListener(() { - setState(() {}); - }); + _animationController = AnimationController(duration: widget.animationDuration, vsync: this); + + _scaleCurve = CurvedAnimation(parent: _animationController, curve: Interval(0.0, 0.4, curve: widget.animationCurve)); + _scaleAnimation = Tween(begin: 0.0, end: 1.0).animate(_scaleCurve as Animation) + ..addListener(() { + setState(() {}); + }); + + _rotateCurve = CurvedAnimation(parent: _animationController, curve: Interval(0.4, 1.0, curve: widget.animationCurve)); + _rotateAnimation = Tween(begin: 0.5, end: 1.0).animate(_rotateCurve as Animation) + ..addListener(() { + setState(() {}); + }); } @override @@ -131,7 +125,7 @@ class FabCircularMenuState extends State return Container( margin: widget.fabMargin, // Removes the default FAB margin - transform: Matrix4.translationValues(16.0, 16.0, 0.0), + transform: widget.removeDefaultFabMargin ? Matrix4.translationValues(16.0, 16.0, 0.0) : null, child: Stack( alignment: widget.alignment, children: [ @@ -156,17 +150,13 @@ class FabCircularMenuState extends State ), child: _scaleAnimation.value == 1.0 ? Transform.rotate( - angle: (2 * pi) * - _rotateAnimation.value * - _directionX * - _directionY, + angle: (2 * pi) * _rotateAnimation.value * _directionX * _directionY, child: Container( child: Stack( alignment: Alignment.center, children: widget.children .asMap() - .map((index, child) => MapEntry(index, - _applyTransformations(child, index))) + .map((index, child) => MapEntry(index, _applyTransformations(child, index))) .values .toList(), ), @@ -197,9 +187,7 @@ class FabCircularMenuState extends State }, child: Center( child: widget.fabChild == null - ? (_scaleAnimation.value == 1.0 - ? widget.fabCloseIcon - : widget.fabOpenIcon) + ? (_scaleAnimation.value == 1.0 ? widget.fabCloseIcon : widget.fabOpenIcon) : widget.fabChild, ), ), @@ -217,18 +205,11 @@ class FabCircularMenuState extends State angleFix = -45.0 * _directionX.abs(); } - final angle = - vector.radians(90.0 / (widget.children.length - 1) * index + angleFix); + final angle = vector.radians(90.0 / (widget.children.length - 1) * index + angleFix); return Transform( - transform: Matrix4.translationValues( - (-(_ringDiameter! / 2) * cos(angle) + - (_ringWidth! / 2 * cos(angle))) * - _directionX, - (-(_ringDiameter! / 2) * sin(angle) + - (_ringWidth! / 2 * sin(angle))) * - _directionY, - 0.0), + transform: Matrix4.translationValues((-(_ringDiameter! / 2) * cos(angle) + (_ringWidth! / 2 * cos(angle))) * _directionX, + (-(_ringDiameter! / 2) * sin(angle) + (_ringWidth! / 2 * sin(angle))) * _directionY, 0.0), alignment: FractionalOffset.center, child: Material( color: Colors.transparent, @@ -244,17 +225,14 @@ class FabCircularMenuState extends State _fabIconBorder = widget.fabIconBorder ?? CircleBorder(); _screenWidth = MediaQuery.of(context).size.width; _screenHeight = MediaQuery.of(context).size.height; - _ringDiameter = - widget.ringDiameter ?? min(_screenWidth, _screenHeight) * 1.25; + _ringDiameter = widget.ringDiameter ?? min(_screenWidth, _screenHeight) * 1.25; _ringWidth = widget.ringWidth ?? _ringDiameter! * 0.3; _marginH = (widget.fabMargin.right + widget.fabMargin.left) / 2; _marginV = (widget.fabMargin.top + widget.fabMargin.bottom) / 2; _directionX = widget.alignment.x == 0 ? 1 : 1 * widget.alignment.x.sign; _directionY = widget.alignment.y == 0 ? 1 : 1 * widget.alignment.y.sign; - _translationX = - ((_screenWidth - widget.fabSize) / 2 - _marginH) * widget.alignment.x; - _translationY = - ((_screenHeight - widget.fabSize) / 2 - _marginV) * widget.alignment.y; + _translationX = ((_screenWidth - widget.fabSize) / 2 - _marginH) * widget.alignment.x; + _translationY = ((_screenHeight - widget.fabSize) / 2 - _marginV) * widget.alignment.y; if (_colorAnimation == null || !kReleaseMode) { _colorCurve = CurvedAnimation( @@ -264,11 +242,10 @@ class FabCircularMenuState extends State 0.4, curve: widget.animationCurve, )); - _colorAnimation = ColorTween(begin: _fabCloseColor, end: _fabOpenColor) - .animate(_colorCurve as Animation) - ..addListener(() { - setState(() {}); - }); + _colorAnimation = ColorTween(begin: _fabCloseColor, end: _fabOpenColor).animate(_colorCurve as Animation) + ..addListener(() { + setState(() {}); + }); } } @@ -310,13 +287,7 @@ class _RingPainter extends CustomPainter { ..style = PaintingStyle.stroke ..strokeWidth = size.width < width! ? size.width : width!; - canvas.drawArc( - Rect.fromLTWH( - width! / 2, width! / 2, size.width - width!, size.height - width!), - 0.0, - 2 * pi, - false, - paint); + canvas.drawArc(Rect.fromLTWH(width! / 2, width! / 2, size.width - width!, size.height - width!), 0.0, 2 * pi, false, paint); } @override From ece0cb54782048b7ed3f59e662362c272aa501c4 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 16 Nov 2020 12:58:05 -0700 Subject: [PATCH 02/16] Adding flutter_export_environment to excludes --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 4421792..9d66b7f 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,8 @@ build/ **/ios/ServiceDefinitions.json **/ios/Runner/GeneratedPluginRegistrant.* +**/example/ios/Flutter/flutter_export_environment.sh + # Exceptions to above rules. !**/ios/**/default.mode1v3 !**/ios/**/default.mode2v3 From 18de7773c9c5b0b19186846eea7b5340fe0dbe3d Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Tue, 1 Dec 2020 16:49:47 -0700 Subject: [PATCH 03/16] Adding buttonKey to allow for better targeting with help --- lib/fab_circular_menu.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/fab_circular_menu.dart b/lib/fab_circular_menu.dart index e3d599d..4dcb7af 100644 --- a/lib/fab_circular_menu.dart +++ b/lib/fab_circular_menu.dart @@ -7,11 +7,19 @@ import 'package:vector_math/vector_math.dart' as vector; typedef DisplayChange = void Function(bool isOpen); class FabCircularMenu extends StatefulWidget { + /// When used as the floatingActionButton in a Scaffold, there is a default margin + /// applied that needs to be removed. If this button is placed manually, this offset + /// can cause issues. Set this value to false to _not_ attempt to remove the default + /// FAB margin + final bool removeDefaultFabMargin; + final List children; final Alignment alignment; final Color? ringColor; final double? ringDiameter; final double? ringWidth; + final Key buttonKey; + final double fabSize; final double fabElevation; final Color? fabColor; @@ -28,6 +36,7 @@ class FabCircularMenu extends StatefulWidget { FabCircularMenu( {Key? key, + this.buttonKey, this.alignment = Alignment.bottomRight, this.ringColor, this.ringDiameter, @@ -173,6 +182,7 @@ class FabCircularMenuState extends State with SingleTickerProvi width: widget.fabSize, height: widget.fabSize, child: RawMaterialButton( + key: widget.buttonKey, fillColor: _colorAnimation!.value, shape: _fabIconBorder, elevation: widget.fabElevation, From 485b4c0e3c30fadf8a4227fe66939cd443b03995 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 18 Jan 2021 10:25:36 -0700 Subject: [PATCH 04/16] Pushing events down to all children --- lib/fab_circular_menu.dart | 8 +- ...tack_with_all_children_receive_events.dart | 92 +++++++++++++++++++ 2 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 lib/stack_with_all_children_receive_events.dart diff --git a/lib/fab_circular_menu.dart b/lib/fab_circular_menu.dart index 4dcb7af..5216121 100644 --- a/lib/fab_circular_menu.dart +++ b/lib/fab_circular_menu.dart @@ -1,5 +1,6 @@ import 'dart:math'; +import 'package:fab_circular_menu/stack_with_all_children_receive_events.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:vector_math/vector_math.dart' as vector; @@ -37,7 +38,7 @@ class FabCircularMenu extends StatefulWidget { FabCircularMenu( {Key? key, this.buttonKey, - this.alignment = Alignment.bottomRight, + this.alignment = Alignment.bottomCenter, this.ringColor, this.ringDiameter, this.ringWidth, @@ -132,10 +133,10 @@ class FabCircularMenuState extends State with SingleTickerProvi } return Container( - margin: widget.fabMargin, // Removes the default FAB margin transform: widget.removeDefaultFabMargin ? Matrix4.translationValues(16.0, 16.0, 0.0) : null, - child: Stack( + child: StackWithAllChildrenReceiveEvents( + overflow: Overflow.visible, alignment: widget.alignment, children: [ // Ring @@ -179,6 +180,7 @@ class FabCircularMenuState extends State with SingleTickerProvi // FAB Container( + margin: widget.fabMargin, width: widget.fabSize, height: widget.fabSize, child: RawMaterialButton( diff --git a/lib/stack_with_all_children_receive_events.dart b/lib/stack_with_all_children_receive_events.dart new file mode 100644 index 0000000..d4f07c2 --- /dev/null +++ b/lib/stack_with_all_children_receive_events.dart @@ -0,0 +1,92 @@ +import 'package:flutter/widgets.dart'; +import 'package:flutter/rendering.dart'; + +/// Passes all events to all children of the stack. The FAB was having issues +/// where the padding on the button was blocking the circular items on the edge +class StackWithAllChildrenReceiveEvents extends Stack { + + StackWithAllChildrenReceiveEvents({ + Key key, + AlignmentGeometry alignment = AlignmentDirectional.topStart, + TextDirection textDirection = TextDirection.ltr, + StackFit fit = StackFit.loose, + Overflow overflow = Overflow.clip, + List children = const [], + Clip clipBehavior = Clip.hardEdge, + }) : super( + key: key, + alignment: alignment, + textDirection: textDirection, + fit: fit, + overflow: overflow, + clipBehavior: clipBehavior, + children: children, + ); + + + @override + RenderStackWithAllChildrenReceiveEvents createRenderObject(BuildContext context) { + return RenderStackWithAllChildrenReceiveEvents( + alignment: alignment, + textDirection: textDirection ?? Directionality.of(context), + fit: fit, + clipBehavior: overflow == Overflow.visible ? Clip.none : clipBehavior, + ); + // return RenderStackWithAllChildrenReceiveEvents( + // alignment: alignment, + // textDirection: textDirection ?? Directionality.of(context), + // fit: fit, + // overflow: overflow, + // ); + } + + @override + void updateRenderObject(BuildContext context, RenderStackWithAllChildrenReceiveEvents renderObject) { + renderObject + ..alignment = alignment + ..textDirection = textDirection ?? Directionality.of(context) + ..fit = fit + ..clipBehavior = overflow == Overflow.visible ? Clip.none : clipBehavior; + } + + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('alignment', alignment)); + properties.add(EnumProperty('textDirection', textDirection, defaultValue: null)); + properties.add(EnumProperty('fit', fit)); + properties.add(EnumProperty('overflow', overflow)); + } + +} + +class RenderStackWithAllChildrenReceiveEvents extends RenderStack { + RenderStackWithAllChildrenReceiveEvents({ + List children, + AlignmentGeometry alignment = AlignmentDirectional.topStart, + TextDirection textDirection, + StackFit fit = StackFit.loose, + Clip clipBehavior = Clip.hardEdge, + }): super( + alignment: alignment, + textDirection: textDirection, + fit: fit, + clipBehavior: clipBehavior, + ); + + bool allCdefaultHitTestChildren(HitTestResult result, { Offset position }) { + // the x, y parameters have the top left of the node's box as the origin + RenderBox child = lastChild; + while (child != null) { + final StackParentData childParentData = child.parentData; + child.hitTest(result, position: position - childParentData.offset); + child = childParentData.previousSibling; + } + return false; + } + + @override + bool hitTestChildren(HitTestResult result, { Offset position }) { + return allCdefaultHitTestChildren(result, position: position); + } +} \ No newline at end of file From c382babe337aa83ad0604f1f13a37efa56f8280c Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Fri, 29 Apr 2022 20:30:22 -0700 Subject: [PATCH 05/16] Work --- .../ios/Flutter/flutter_export_environment.sh | 5 +- example/lib/main.dart | 10 +- example/pubspec.lock | 8 +- example/pubspec.yaml | 2 +- lib/fab_circular_menu.dart | 109 +++++++++++++----- ...tack_with_all_children_receive_events.dart | 51 ++++---- pubspec.lock | 6 +- 7 files changed, 121 insertions(+), 70 deletions(-) diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index ab579d2..afca946 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -1,7 +1,8 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/Library/SDKs/flutter" -export "FLUTTER_APPLICATION_PATH=/Users/mariano/Dev/OpenSource/fab-circular-menu/example" +export "FLUTTER_ROOT=/Users/ericm/fvm/versions/2.2.1" +export "FLUTTER_APPLICATION_PATH=/Users/ericm/sunny/local_plugins/fab_circular_menu/example" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_BUILD_DIR=build" export "SYMROOT=${SOURCE_ROOT}/../build/ios" diff --git a/example/lib/main.dart b/example/lib/main.dart index 22779e6..d3ba7e4 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -6,7 +6,6 @@ void main() { } class MyApp extends StatelessWidget { - final GlobalKey fabKey = GlobalKey(); @override @@ -19,7 +18,7 @@ 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) { @@ -100,12 +99,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), - ) - ); + )); } - } diff --git a/example/pubspec.lock b/example/pubspec.lock index 9b85a3e..3257536 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" boolean_selector: dependency: transitive description: @@ -56,7 +56,7 @@ packages: path: ".." relative: true source: path - version: "1.0.1" + version: "1.0.2" fake_async: dependency: transitive description: @@ -106,7 +106,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -141,7 +141,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" typed_data: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 076f3d1..0d1a4a9 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: cupertino_icons: ^0.1.2 fab_circular_menu: - path: ./../ + path: ../ dev_dependencies: flutter_test: diff --git a/lib/fab_circular_menu.dart b/lib/fab_circular_menu.dart index 5216121..7de153d 100644 --- a/lib/fab_circular_menu.dart +++ b/lib/fab_circular_menu.dart @@ -19,8 +19,9 @@ class FabCircularMenu extends StatefulWidget { final Color? ringColor; final double? ringDiameter; final double? ringWidth; - final Key buttonKey; - + final Key? buttonKey; + final double rangeStartOffset; + final double rangeEndOffset; final double fabSize; final double fabElevation; final Color? fabColor; @@ -31,10 +32,14 @@ class FabCircularMenu extends StatefulWidget { final Widget fabCloseIcon; final ShapeBorder? fabIconBorder; final EdgeInsets fabMargin; + final Offset menuOffset; final Duration animationDuration; final Curve animationCurve; final DisplayChange? onDisplayChange; + /// Disables the menu from appearing, in favor of a simple onTap handler + final VoidCallback? onFabTap; + FabCircularMenu( {Key? key, this.buttonKey, @@ -42,13 +47,17 @@ class FabCircularMenu extends StatefulWidget { this.ringColor, this.ringDiameter, this.ringWidth, + this.onFabTap, this.fabSize = 64.0, + this.menuOffset = Offset.zero, this.fabElevation = 8.0, this.fabColor, this.fabOpenColor, this.removeDefaultFabMargin = true, this.fabCloseColor, this.fabIconBorder, + this.rangeStartOffset = 0.0, + this.rangeEndOffset = 0.0, this.fabChild, this.fabOpenIcon = const Icon(Icons.menu), this.fabCloseIcon = const Icon(Icons.close), @@ -64,7 +73,8 @@ class FabCircularMenu extends StatefulWidget { FabCircularMenuState createState() => FabCircularMenuState(); } -class FabCircularMenuState extends State with SingleTickerProviderStateMixin { +class FabCircularMenuState extends State + with SingleTickerProviderStateMixin { late double _screenWidth; late double _screenHeight; late double _marginH; @@ -97,16 +107,23 @@ class FabCircularMenuState extends State with SingleTickerProvi void initState() { super.initState(); - _animationController = AnimationController(duration: widget.animationDuration, vsync: this); + _animationController = + AnimationController(duration: widget.animationDuration, vsync: this); - _scaleCurve = CurvedAnimation(parent: _animationController, curve: Interval(0.0, 0.4, curve: widget.animationCurve)); - _scaleAnimation = Tween(begin: 0.0, end: 1.0).animate(_scaleCurve as Animation) + _scaleCurve = CurvedAnimation( + parent: _animationController, + curve: Interval(0.0, 0.4, curve: widget.animationCurve)); + _scaleAnimation = Tween(begin: 0.0, end: 1.0) + .animate(_scaleCurve as Animation) ..addListener(() { setState(() {}); }); - _rotateCurve = CurvedAnimation(parent: _animationController, curve: Interval(0.4, 1.0, curve: widget.animationCurve)); - _rotateAnimation = Tween(begin: 0.5, end: 1.0).animate(_rotateCurve as Animation) + _rotateCurve = CurvedAnimation( + parent: _animationController, + curve: Interval(0.4, 1.0, curve: widget.animationCurve)); + _rotateAnimation = Tween(begin: 0.5, end: 1.0) + .animate(_rotateCurve as Animation) ..addListener(() { setState(() {}); }); @@ -134,7 +151,9 @@ class FabCircularMenuState extends State with SingleTickerProvi return Container( // Removes the default FAB margin - transform: widget.removeDefaultFabMargin ? Matrix4.translationValues(16.0, 16.0, 0.0) : null, + transform: widget.removeDefaultFabMargin + ? Matrix4.translationValues(16.0, 16.0, 0.0) + : null, child: StackWithAllChildrenReceiveEvents( overflow: Overflow.visible, alignment: widget.alignment, @@ -160,13 +179,17 @@ class FabCircularMenuState extends State with SingleTickerProvi ), child: _scaleAnimation.value == 1.0 ? Transform.rotate( - angle: (2 * pi) * _rotateAnimation.value * _directionX * _directionY, + angle: (2 * pi) * + _rotateAnimation.value * + _directionX * + _directionY, child: Container( child: Stack( alignment: Alignment.center, children: widget.children .asMap() - .map((index, child) => MapEntry(index, _applyTransformations(child, index))) + .map((index, child) => MapEntry(index, + _applyTransformations(child, index))) .values .toList(), ), @@ -189,17 +212,24 @@ class FabCircularMenuState extends State with SingleTickerProvi shape: _fabIconBorder, elevation: widget.fabElevation, onPressed: () { - if (_isAnimating) return; - - if (_isOpen) { - close(); + if (widget.onFabTap != null) { + widget.onFabTap!(); + return; } else { - open(); + if (_isAnimating) return; + + if (_isOpen) { + close(); + } else { + open(); + } } }, child: Center( child: widget.fabChild == null - ? (_scaleAnimation.value == 1.0 ? widget.fabCloseIcon : widget.fabOpenIcon) + ? (_scaleAnimation.value == 1.0 + ? widget.fabCloseIcon + : widget.fabOpenIcon) : widget.fabChild, ), ), @@ -216,12 +246,23 @@ class FabCircularMenuState extends State with SingleTickerProvi } else if (widget.alignment.y == 0) { angleFix = -45.0 * _directionX.abs(); } + angleFix += widget.rangeStartOffset; - final angle = vector.radians(90.0 / (widget.children.length - 1) * index + angleFix); + final angle = vector.radians( + (90.0 - widget.rangeStartOffset - widget.rangeEndOffset) / + (widget.children.length - 1) * + index + + angleFix); return Transform( - transform: Matrix4.translationValues((-(_ringDiameter! / 2) * cos(angle) + (_ringWidth! / 2 * cos(angle))) * _directionX, - (-(_ringDiameter! / 2) * sin(angle) + (_ringWidth! / 2 * sin(angle))) * _directionY, 0.0), + transform: Matrix4.translationValues( + (-(_ringDiameter! / 2) * cos(angle) + + (_ringWidth! / 2 * cos(angle))) * + _directionX, + (-(_ringDiameter! / 2) * sin(angle) + + (_ringWidth! / 2 * sin(angle))) * + _directionY, + 0.0), alignment: FractionalOffset.center, child: Material( color: Colors.transparent, @@ -237,14 +278,19 @@ class FabCircularMenuState extends State with SingleTickerProvi _fabIconBorder = widget.fabIconBorder ?? CircleBorder(); _screenWidth = MediaQuery.of(context).size.width; _screenHeight = MediaQuery.of(context).size.height; - _ringDiameter = widget.ringDiameter ?? min(_screenWidth, _screenHeight) * 1.25; + _ringDiameter = + widget.ringDiameter ?? min(_screenWidth, _screenHeight) * 1.25; _ringWidth = widget.ringWidth ?? _ringDiameter! * 0.3; _marginH = (widget.fabMargin.right + widget.fabMargin.left) / 2; _marginV = (widget.fabMargin.top + widget.fabMargin.bottom) / 2; _directionX = widget.alignment.x == 0 ? 1 : 1 * widget.alignment.x.sign; _directionY = widget.alignment.y == 0 ? 1 : 1 * widget.alignment.y.sign; - _translationX = ((_screenWidth - widget.fabSize) / 2 - _marginH) * widget.alignment.x; - _translationY = ((_screenHeight - widget.fabSize) / 2 - _marginV) * widget.alignment.y; + _translationX = (((_screenWidth - widget.fabSize) / 2 - _marginH) * + widget.alignment.x) + + widget.menuOffset.dx; + _translationY = (((_screenHeight - widget.fabSize) / 2 - _marginV) * + widget.alignment.y) + + widget.menuOffset.dy; if (_colorAnimation == null || !kReleaseMode) { _colorCurve = CurvedAnimation( @@ -254,7 +300,8 @@ class FabCircularMenuState extends State with SingleTickerProvi 0.4, curve: widget.animationCurve, )); - _colorAnimation = ColorTween(begin: _fabCloseColor, end: _fabOpenColor).animate(_colorCurve as Animation) + _colorAnimation = ColorTween(begin: _fabCloseColor, end: _fabOpenColor) + .animate(_colorCurve as Animation) ..addListener(() { setState(() {}); }); @@ -290,7 +337,10 @@ class _RingPainter extends CustomPainter { final double? width; final Color? color; - _RingPainter({required this.width, this.color}); + _RingPainter({ + required this.width, + this.color, + }); @override void paint(Canvas canvas, Size size) { @@ -299,7 +349,14 @@ class _RingPainter extends CustomPainter { ..style = PaintingStyle.stroke ..strokeWidth = size.width < width! ? size.width : width!; - canvas.drawArc(Rect.fromLTWH(width! / 2, width! / 2, size.width - width!, size.height - width!), 0.0, 2 * pi, false, paint); + canvas.drawArc( + Rect.fromLTWH( + width! / 2, width! / 2, size.width - width!, size.height - width!), + 0.0, + 2 * pi, + false, + paint, + ); } @override diff --git a/lib/stack_with_all_children_receive_events.dart b/lib/stack_with_all_children_receive_events.dart index d4f07c2..9c3b535 100644 --- a/lib/stack_with_all_children_receive_events.dart +++ b/lib/stack_with_all_children_receive_events.dart @@ -4,9 +4,8 @@ import 'package:flutter/rendering.dart'; /// Passes all events to all children of the stack. The FAB was having issues /// where the padding on the button was blocking the circular items on the edge class StackWithAllChildrenReceiveEvents extends Stack { - StackWithAllChildrenReceiveEvents({ - Key key, + Key? key, AlignmentGeometry alignment = AlignmentDirectional.topStart, TextDirection textDirection = TextDirection.ltr, StackFit fit = StackFit.loose, @@ -14,15 +13,14 @@ class StackWithAllChildrenReceiveEvents extends Stack { List children = const [], Clip clipBehavior = Clip.hardEdge, }) : super( - key: key, - alignment: alignment, - textDirection: textDirection, - fit: fit, - overflow: overflow, - clipBehavior: clipBehavior, - children: children, - ); - + key: key, + alignment: alignment, + textDirection: textDirection, + fit: fit, + overflow: overflow, + clipBehavior: clipBehavior, + children: children, + ); @override RenderStackWithAllChildrenReceiveEvents createRenderObject(BuildContext context) { @@ -57,36 +55,35 @@ class StackWithAllChildrenReceiveEvents extends Stack { properties.add(EnumProperty('fit', fit)); properties.add(EnumProperty('overflow', overflow)); } - } class RenderStackWithAllChildrenReceiveEvents extends RenderStack { RenderStackWithAllChildrenReceiveEvents({ - List children, + List children = const [], AlignmentGeometry alignment = AlignmentDirectional.topStart, - TextDirection textDirection, + TextDirection? textDirection, StackFit fit = StackFit.loose, Clip clipBehavior = Clip.hardEdge, - }): super( - alignment: alignment, - textDirection: textDirection, - fit: fit, - clipBehavior: clipBehavior, - ); + }) : super( + alignment: alignment, + textDirection: textDirection, + fit: fit, + clipBehavior: clipBehavior, + ); - bool allCdefaultHitTestChildren(HitTestResult result, { Offset position }) { + bool defaultHitTestChildren(HitTestResult result, {required Offset position}) { // the x, y parameters have the top left of the node's box as the origin - RenderBox child = lastChild; + var child = lastChild; while (child != null) { - final StackParentData childParentData = child.parentData; - child.hitTest(result, position: position - childParentData.offset); + StackParentData childParentData = child.parentData as StackParentData; + child.hitTest(result as BoxHitTestResult, position: position - childParentData.offset); child = childParentData.previousSibling; } return false; } @override - bool hitTestChildren(HitTestResult result, { Offset position }) { - return allCdefaultHitTestChildren(result, position: position); + bool hitTestChildren(HitTestResult result, {required Offset position}) { + return defaultHitTestChildren(result, position: position); } -} \ No newline at end of file +} diff --git a/pubspec.lock b/pubspec.lock index 41fef42..a2e0a7c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" boolean_selector: dependency: transitive description: @@ -92,7 +92,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -127,7 +127,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" typed_data: dependency: transitive description: From 90fce63f2113eea3f80bdb79debe2db28a5a133b Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 2 May 2022 09:42:14 -0700 Subject: [PATCH 06/16] feat: bumping version --- .../ios/Flutter/flutter_export_environment.sh | 3 +-- example/pubspec.lock | 23 +++++++++++------ pubspec.lock | 25 +++++++++++++------ 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index afca946..d38e93e 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -1,11 +1,10 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/Users/ericm/fvm/versions/2.2.1" +export "FLUTTER_ROOT=/Users/ericm/fvm/versions/2.10.5" export "FLUTTER_APPLICATION_PATH=/Users/ericm/sunny/local_plugins/fab_circular_menu/example" export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build/ios" export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NUMBER=1" export "DART_OBFUSCATION=false" diff --git a/example/pubspec.lock b/example/pubspec.lock index 3257536..579d46b 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -21,14 +21,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -80,14 +80,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -141,7 +148,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.8" typed_data: dependency: transitive description: @@ -155,6 +162,6 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.14.0 <3.0.0" diff --git a/pubspec.lock b/pubspec.lock index a2e0a7c..bf157be 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -21,14 +21,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -66,14 +66,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -127,7 +134,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.8" typed_data: dependency: transitive description: @@ -141,6 +148,8 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.14.0 <3.0.0" + + From 39dba9e5c1b6f2fc7962c9ea8b7cfff764881b0f Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 2 May 2022 11:31:25 -0700 Subject: [PATCH 07/16] feat: Cleaning up for melos publish --- CHANGELOG.md | 4 ++++ example/ios/Flutter/flutter_export_environment.sh | 13 ------------- example/pubspec.lock | 2 +- pubspec.lock | 2 -- pubspec.yaml | 2 +- 5 files changed, 6 insertions(+), 17 deletions(-) delete mode 100755 example/ios/Flutter/flutter_export_environment.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index caf9712..c64e183 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.0-dev.0 + + - **FEAT**: bumping version. + ## 1.0.2 * Null safety * Changed the children count requirement to 1 from 2 diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh deleted file mode 100755 index d38e93e..0000000 --- a/example/ios/Flutter/flutter_export_environment.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/Users/ericm/fvm/versions/2.10.5" -export "FLUTTER_APPLICATION_PATH=/Users/ericm/sunny/local_plugins/fab_circular_menu/example" -export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=lib/main.dart" -export "FLUTTER_BUILD_DIR=build" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=false" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.packages" diff --git a/example/pubspec.lock b/example/pubspec.lock index 579d46b..66fd117 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -56,7 +56,7 @@ packages: path: ".." relative: true source: path - version: "1.0.2" + version: "1.1.0-dev.0" fake_async: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index bf157be..b9d35e1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -151,5 +151,3 @@ packages: version: "2.1.1" sdks: dart: ">=2.14.0 <3.0.0" - - diff --git a/pubspec.yaml b/pubspec.yaml index 9e0c16a..461737d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: fab_circular_menu description: A Flutter package to create a nice circular menu using a Floating Action Button. homepage: https://github.com/marianocordoba/fab-circular-menu -version: 1.0.2 +version: 1.1.0-dev.0 environment: sdk: '>=2.12.0 <3.0.0' From 822f1a21d1a08bfd4cc4560851b038aa0da4dfb5 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Wed, 4 May 2022 01:43:44 -0700 Subject: [PATCH 08/16] fix: Pre-dartfix --- CHANGELOG.md | 34 +++++++++++++++++++ example/pubspec.lock | 12 +++---- example/pubspec.yaml | 34 ++++++++----------- ...tack_with_all_children_receive_events.dart | 19 +++++++---- pubspec.lock | 2 +- pubspec.yaml | 5 +-- 6 files changed, 71 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c64e183..4edf162 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,37 @@ +## 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. diff --git a/example/pubspec.lock b/example/pubspec.lock index 66fd117..91eec69 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -49,14 +49,14 @@ packages: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "1.0.4" fab_circular_menu: dependency: "direct main" description: - path: ".." - relative: true - source: path - version: "1.1.0-dev.0" + name: fab_circular_menu + url: "https://dart.cloudsmith.io/edspuzzles/edspuzzle-public/" + source: hosted + version: "1.1.0" fake_async: dependency: transitive description: @@ -164,4 +164,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.15.0 <3.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 0d1a4a9..0d6892c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,23 +1,17 @@ -name: example -description: FAB Circular Menu Example - +name: fab_circular_menu_example version: 1.0.0+1 - -environment: - sdk: ">=2.1.0 <3.0.0" - -dependencies: - flutter: +description: FAB Circular Menu Example +environment: + sdk: '>=2.15.0 <3.0.0' +dependencies: + cupertino_icons: ^1.0.4 + flutter: sdk: flutter - - cupertino_icons: ^0.1.2 - fab_circular_menu: - path: ../ - -dev_dependencies: - flutter_test: + fab_circular_menu: + hosted: https://dart.cloudsmith.io/edspuzzles/edspuzzle-public/ + version: ^1.1.0 +dev_dependencies: + flutter_test: sdk: flutter - -flutter: - - uses-material-design: true \ No newline at end of file +flutter: + uses-material-design: true diff --git a/lib/stack_with_all_children_receive_events.dart b/lib/stack_with_all_children_receive_events.dart index 9c3b535..023e76b 100644 --- a/lib/stack_with_all_children_receive_events.dart +++ b/lib/stack_with_all_children_receive_events.dart @@ -23,7 +23,8 @@ class StackWithAllChildrenReceiveEvents extends Stack { ); @override - RenderStackWithAllChildrenReceiveEvents createRenderObject(BuildContext context) { + RenderStackWithAllChildrenReceiveEvents createRenderObject( + BuildContext context) { return RenderStackWithAllChildrenReceiveEvents( alignment: alignment, textDirection: textDirection ?? Directionality.of(context), @@ -39,7 +40,8 @@ class StackWithAllChildrenReceiveEvents extends Stack { } @override - void updateRenderObject(BuildContext context, RenderStackWithAllChildrenReceiveEvents renderObject) { + void updateRenderObject(BuildContext context, + RenderStackWithAllChildrenReceiveEvents renderObject) { renderObject ..alignment = alignment ..textDirection = textDirection ?? Directionality.of(context) @@ -50,8 +52,10 @@ class StackWithAllChildrenReceiveEvents extends Stack { @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); - properties.add(DiagnosticsProperty('alignment', alignment)); - properties.add(EnumProperty('textDirection', textDirection, defaultValue: null)); + properties + .add(DiagnosticsProperty('alignment', alignment)); + properties.add(EnumProperty('textDirection', textDirection, + defaultValue: null)); properties.add(EnumProperty('fit', fit)); properties.add(EnumProperty('overflow', overflow)); } @@ -71,12 +75,15 @@ class RenderStackWithAllChildrenReceiveEvents extends RenderStack { clipBehavior: clipBehavior, ); - bool defaultHitTestChildren(HitTestResult result, {required Offset position}) { + @override + bool defaultHitTestChildren(HitTestResult result, + {required Offset position}) { // the x, y parameters have the top left of the node's box as the origin var child = lastChild; while (child != null) { StackParentData childParentData = child.parentData as StackParentData; - child.hitTest(result as BoxHitTestResult, position: position - childParentData.offset); + child.hitTest(result as BoxHitTestResult, + position: position - childParentData.offset); child = childParentData.previousSibling; } return false; diff --git a/pubspec.lock b/pubspec.lock index b9d35e1..678a604 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -150,4 +150,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.15.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 461737d..2380c9f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,11 @@ name: fab_circular_menu description: A Flutter package to create a nice circular menu using a Floating Action Button. homepage: https://github.com/marianocordoba/fab-circular-menu -version: 1.1.0-dev.0 +version: 1.1.0 +publish_to: https://dart.cloudsmith.io/edspuzzles/edspuzzle-public/ environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.15.0 <3.0.0' dependencies: flutter: From 8c53b754c9e02c64636227ea0ea02e8aa48b5423 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Wed, 4 May 2022 10:02:44 -0700 Subject: [PATCH 09/16] fix: Running dart fix --- example/pubspec_overrides.yaml | 4 ++++ lib/fab_circular_menu.dart | 2 +- lib/stack_with_all_children_receive_events.dart | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 example/pubspec_overrides.yaml diff --git a/example/pubspec_overrides.yaml b/example/pubspec_overrides.yaml new file mode 100644 index 0000000..a5e78b7 --- /dev/null +++ b/example/pubspec_overrides.yaml @@ -0,0 +1,4 @@ +# melos_managed_dependency_overrides: fab_circular_menu +dependency_overrides: + fab_circular_menu: + path: .. diff --git a/lib/fab_circular_menu.dart b/lib/fab_circular_menu.dart index 7de153d..dcbc249 100644 --- a/lib/fab_circular_menu.dart +++ b/lib/fab_circular_menu.dart @@ -271,7 +271,7 @@ class FabCircularMenuState extends State } void _calculateProps() { - _ringColor = widget.ringColor ?? Theme.of(context).accentColor; + _ringColor = widget.ringColor ?? Theme.of(context).colorScheme.secondary; _fabColor = widget.fabColor ?? Theme.of(context).primaryColor; _fabOpenColor = widget.fabOpenColor ?? _fabColor; _fabCloseColor = widget.fabCloseColor ?? _fabColor; diff --git a/lib/stack_with_all_children_receive_events.dart b/lib/stack_with_all_children_receive_events.dart index 023e76b..b5070bb 100644 --- a/lib/stack_with_all_children_receive_events.dart +++ b/lib/stack_with_all_children_receive_events.dart @@ -29,7 +29,7 @@ class StackWithAllChildrenReceiveEvents extends Stack { alignment: alignment, textDirection: textDirection ?? Directionality.of(context), fit: fit, - clipBehavior: overflow == Overflow.visible ? Clip.none : clipBehavior, + clipBehavior: clipBehavior == Overflow.visible ? Clip.none : clipBehavior, ); // return RenderStackWithAllChildrenReceiveEvents( // alignment: alignment, @@ -46,7 +46,8 @@ class StackWithAllChildrenReceiveEvents extends Stack { ..alignment = alignment ..textDirection = textDirection ?? Directionality.of(context) ..fit = fit - ..clipBehavior = overflow == Overflow.visible ? Clip.none : clipBehavior; + ..clipBehavior = + clipBehavior == Overflow.visible ? Clip.none : clipBehavior; } @override @@ -58,6 +59,7 @@ class StackWithAllChildrenReceiveEvents extends Stack { defaultValue: null)); properties.add(EnumProperty('fit', fit)); properties.add(EnumProperty('overflow', overflow)); + properties.add(EnumProperty('clipBehavior', clipBehavior)); } } From 44088762000497cea11df21548672ed5320f4e4a Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 16 May 2022 00:27:27 -0700 Subject: [PATCH 10/16] chore: Upgrade flutter 3.0.0 --- example/lib/main.dart | 21 +++++++++----- example/pubspec.lock | 29 +++++++------------ example/pubspec.yaml | 3 +- example/pubspec_overrides.yaml | 4 --- lib/fab_circular_menu.dart | 1 - ...tack_with_all_children_receive_events.dart | 8 ++--- pubspec.lock | 23 +++++---------- pubspec.yaml | 2 +- 8 files changed, 36 insertions(+), 55 deletions(-) delete mode 100644 example/pubspec_overrides.yaml diff --git a/example/lib/main.dart b/example/lib/main.dart index d3ba7e4..b2b299c 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -21,14 +21,17 @@ class MyApp extends StatelessWidget { 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)), ), ), ), @@ -55,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: [ RawMaterialButton( @@ -84,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), diff --git a/example/pubspec.lock b/example/pubspec.lock index 91eec69..10236cb 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -42,7 +42,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" cupertino_icons: dependency: "direct main" description: @@ -53,9 +53,9 @@ packages: fab_circular_menu: dependency: "direct main" description: - name: fab_circular_menu - url: "https://dart.cloudsmith.io/edspuzzles/edspuzzle-public/" - source: hosted + path: "/Users/ericm/sunny/player_rank/packages/fab_circular_menu" + relative: false + source: path version: "1.1.0" fake_async: dependency: transitive @@ -63,7 +63,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" flutter: dependency: "direct main" description: flutter @@ -87,7 +87,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" meta: dependency: transitive description: @@ -101,7 +101,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" sky_engine: dependency: transitive description: flutter @@ -113,7 +113,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -148,20 +148,13 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.9" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: - dart: ">=2.15.0 <3.0.0" + dart: ">=2.17.0 <3.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 0d6892c..7aca8f9 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,8 +8,7 @@ dependencies: flutter: sdk: flutter fab_circular_menu: - hosted: https://dart.cloudsmith.io/edspuzzles/edspuzzle-public/ - version: ^1.1.0 + path: /Users/ericm/sunny/player_rank/packages/fab_circular_menu dev_dependencies: flutter_test: sdk: flutter diff --git a/example/pubspec_overrides.yaml b/example/pubspec_overrides.yaml deleted file mode 100644 index a5e78b7..0000000 --- a/example/pubspec_overrides.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# melos_managed_dependency_overrides: fab_circular_menu -dependency_overrides: - fab_circular_menu: - path: .. diff --git a/lib/fab_circular_menu.dart b/lib/fab_circular_menu.dart index dcbc249..83fe65c 100644 --- a/lib/fab_circular_menu.dart +++ b/lib/fab_circular_menu.dart @@ -155,7 +155,6 @@ class FabCircularMenuState extends State ? Matrix4.translationValues(16.0, 16.0, 0.0) : null, child: StackWithAllChildrenReceiveEvents( - overflow: Overflow.visible, alignment: widget.alignment, children: [ // Ring diff --git a/lib/stack_with_all_children_receive_events.dart b/lib/stack_with_all_children_receive_events.dart index b5070bb..a7edc49 100644 --- a/lib/stack_with_all_children_receive_events.dart +++ b/lib/stack_with_all_children_receive_events.dart @@ -9,7 +9,6 @@ class StackWithAllChildrenReceiveEvents extends Stack { AlignmentGeometry alignment = AlignmentDirectional.topStart, TextDirection textDirection = TextDirection.ltr, StackFit fit = StackFit.loose, - Overflow overflow = Overflow.clip, List children = const [], Clip clipBehavior = Clip.hardEdge, }) : super( @@ -17,7 +16,6 @@ class StackWithAllChildrenReceiveEvents extends Stack { alignment: alignment, textDirection: textDirection, fit: fit, - overflow: overflow, clipBehavior: clipBehavior, children: children, ); @@ -29,7 +27,7 @@ class StackWithAllChildrenReceiveEvents extends Stack { alignment: alignment, textDirection: textDirection ?? Directionality.of(context), fit: fit, - clipBehavior: clipBehavior == Overflow.visible ? Clip.none : clipBehavior, + clipBehavior: clipBehavior, ); // return RenderStackWithAllChildrenReceiveEvents( // alignment: alignment, @@ -46,8 +44,7 @@ class StackWithAllChildrenReceiveEvents extends Stack { ..alignment = alignment ..textDirection = textDirection ?? Directionality.of(context) ..fit = fit - ..clipBehavior = - clipBehavior == Overflow.visible ? Clip.none : clipBehavior; + ..clipBehavior = clipBehavior; } @override @@ -58,7 +55,6 @@ class StackWithAllChildrenReceiveEvents extends Stack { properties.add(EnumProperty('textDirection', textDirection, defaultValue: null)); properties.add(EnumProperty('fit', fit)); - properties.add(EnumProperty('overflow', overflow)); properties.add(EnumProperty('clipBehavior', clipBehavior)); } } diff --git a/pubspec.lock b/pubspec.lock index 678a604..3b36351 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,14 +42,14 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" flutter: dependency: "direct main" description: flutter @@ -73,7 +73,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" meta: dependency: transitive description: @@ -87,7 +87,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" sky_engine: dependency: transitive description: flutter @@ -99,7 +99,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -134,20 +134,13 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.9" vector_math: dependency: "direct main" description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: - dart: ">=2.15.0 <3.0.0" + dart: ">=2.17.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 2380c9f..97c93a5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.1.0 publish_to: https://dart.cloudsmith.io/edspuzzles/edspuzzle-public/ environment: - sdk: '>=2.15.0 <3.0.0' + sdk: '>=2.17.0 <3.0.0' dependencies: flutter: From 8a05a8318ae66944c2bc5b8350b490f8d5d51028 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 5 Dec 2022 13:34:10 -0700 Subject: [PATCH 11/16] chore: Project name/podspec: --- example/ios/Flutter/Flutter.podspec | 18 -------------- example/pubspec.lock | 37 ++++++++++++----------------- example/pubspec.yaml | 4 ++-- pubspec.lock | 31 ++++++++++-------------- pubspec.yaml | 22 +++++++---------- 5 files changed, 38 insertions(+), 74 deletions(-) delete mode 100644 example/ios/Flutter/Flutter.podspec diff --git a/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 5ca3041..0000000 --- a/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.description = <<-DESC -Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. - DESC - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - s.vendored_frameworks = 'Flutter.framework' -end diff --git a/example/pubspec.lock b/example/pubspec.lock index 10236cb..f5c45d8 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,21 +21,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: @@ -49,11 +42,11 @@ packages: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" fab_circular_menu: dependency: "direct main" description: - path: "/Users/ericm/sunny/player_rank/packages/fab_circular_menu" + path: "/Users/ericm/sunny/local_plugins/fab_circular_menu" relative: false source: path version: "1.1.0" @@ -63,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -80,28 +73,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -113,7 +106,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -134,21 +127,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" vector_math: dependency: transitive description: @@ -157,4 +150,4 @@ packages: source: hosted version: "2.1.2" sdks: - dart: ">=2.17.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 7aca8f9..499e540 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,11 +4,11 @@ description: FAB Circular Menu Example environment: sdk: '>=2.15.0 <3.0.0' dependencies: - cupertino_icons: ^1.0.4 + cupertino_icons: ^1.0.5 flutter: sdk: flutter fab_circular_menu: - path: /Users/ericm/sunny/player_rank/packages/fab_circular_menu + path: /Users/ericm/sunny/local_plugins/fab_circular_menu dev_dependencies: flutter_test: sdk: flutter diff --git a/pubspec.lock b/pubspec.lock index 3b36351..b99abca 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,21 +21,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: @@ -49,7 +42,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -66,28 +59,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -99,7 +92,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -120,21 +113,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.9" + version: "0.4.12" vector_math: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 97c93a5..e36b5c4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,19 +1,15 @@ name: fab_circular_menu -description: A Flutter package to create a nice circular menu using a Floating Action Button. -homepage: https://github.com/marianocordoba/fab-circular-menu version: 1.1.0 +homepage: https://github.com/marianocordoba/fab-circular-menu publish_to: https://dart.cloudsmith.io/edspuzzles/edspuzzle-public/ - -environment: +description: A Flutter package to create a nice circular menu using a Floating Action Button. +environment: sdk: '>=2.17.0 <3.0.0' - -dependencies: - flutter: - sdk: flutter +dependencies: vector_math: ^2.0.8 - -dev_dependencies: - flutter_test: + flutter: + sdk: flutter +dev_dependencies: + flutter_test: sdk: flutter - -flutter: +flutter: null From 523e3eba2cd7ba3035558b21e42a0d7a0f37241f Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 5 Dec 2022 17:42:07 -0700 Subject: [PATCH 12/16] chore: Update dependencies --- example/pubspec.lock | 44 +++++++++++++++----------------------------- pubspec.lock | 44 +++++++++++++++----------------------------- 2 files changed, 30 insertions(+), 58 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 91eec69..68d2c52 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,28 +21,21 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" cupertino_icons: dependency: "direct main" description: @@ -63,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -80,28 +73,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -113,7 +106,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -134,34 +127,27 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.12" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: - dart: ">=2.15.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" diff --git a/pubspec.lock b/pubspec.lock index 678a604..6bba202 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,35 +21,28 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -66,28 +59,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -99,7 +92,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -120,34 +113,27 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.12" vector_math: dependency: "direct main" description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: - dart: ">=2.15.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" From cdac9cb65803105557c5151a1347d313e0212a61 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 12 Dec 2022 14:50:15 -0700 Subject: [PATCH 13/16] chore: gitignore: --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9d66b7f..9329491 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,4 @@ build/ !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +pubspec_overrides.yaml From 2042c77cca0a965f09781b2f29e466f90e5e3bb6 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Mon, 12 Dec 2022 14:52:49 -0700 Subject: [PATCH 14/16] chore: Update dependencies --- example/pubspec.lock | 10 +++++----- example/pubspec.yaml | 2 +- pubspec.lock | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index f5c45d8..b16b0ef 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -2,7 +2,7 @@ # See https://dart.dev/tools/pub/glossary#lockfile packages: async: - dependency: transitive + dependency: "direct overridden" description: name: async url: "https://pub.dartlang.org" @@ -30,7 +30,7 @@ packages: source: hosted version: "1.1.1" collection: - dependency: transitive + dependency: "direct overridden" description: name: collection url: "https://pub.dartlang.org" @@ -46,7 +46,7 @@ packages: fab_circular_menu: dependency: "direct main" description: - path: "/Users/ericm/sunny/local_plugins/fab_circular_menu" + path: "/Users/ericm/reliveit/checkout/SunnyApp/fab-circular-menu" relative: false source: path version: "1.1.0" @@ -82,14 +82,14 @@ packages: source: hosted version: "0.1.5" meta: - dependency: transitive + dependency: "direct overridden" description: name: meta url: "https://pub.dartlang.org" source: hosted version: "1.8.0" path: - dependency: transitive + dependency: "direct overridden" description: name: path url: "https://pub.dartlang.org" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 499e540..8d2f632 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,7 +8,7 @@ dependencies: flutter: sdk: flutter fab_circular_menu: - path: /Users/ericm/sunny/local_plugins/fab_circular_menu + path: /Users/ericm/reliveit/checkout/SunnyApp/fab-circular-menu dev_dependencies: flutter_test: sdk: flutter diff --git a/pubspec.lock b/pubspec.lock index 6bba202..ba6b091 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -2,7 +2,7 @@ # See https://dart.dev/tools/pub/glossary#lockfile packages: async: - dependency: transitive + dependency: "direct overridden" description: name: async url: "https://pub.dartlang.org" @@ -30,7 +30,7 @@ packages: source: hosted version: "1.1.1" collection: - dependency: transitive + dependency: "direct overridden" description: name: collection url: "https://pub.dartlang.org" @@ -68,14 +68,14 @@ packages: source: hosted version: "0.1.5" meta: - dependency: transitive + dependency: "direct overridden" description: name: meta url: "https://pub.dartlang.org" source: hosted version: "1.8.0" path: - dependency: transitive + dependency: "direct overridden" description: name: path url: "https://pub.dartlang.org" From 58eb69e3f7dd48d116e4b1e1f46fcba384337fc0 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Wed, 24 May 2023 12:59:32 -0700 Subject: [PATCH 15/16] chore: Update dependencies --- example/pubspec.lock | 90 ++++++++++++++++++++++++-------------- lib/fab_circular_menu.dart | 2 + pubspec.lock | 87 +++++++++++++++++++++++------------- 3 files changed, 116 insertions(+), 63 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index b16b0ef..b316e41 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,42 +5,48 @@ packages: dependency: "direct overridden" description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.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: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: "direct overridden" description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.1" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" source: hosted version: "1.0.5" fab_circular_menu: @@ -54,7 +60,8 @@ packages: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" flutter: @@ -67,34 +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: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: "direct overridden" description: name: meta - url: "https://pub.dartlang.org" + sha256: "12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" path: dependency: "direct overridden" description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" sky_engine: dependency: transitive description: flutter @@ -104,50 +123,57 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" 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.1" + 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.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.18.0 <3.0.0" diff --git a/lib/fab_circular_menu.dart b/lib/fab_circular_menu.dart index 83fe65c..753786d 100644 --- a/lib/fab_circular_menu.dart +++ b/lib/fab_circular_menu.dart @@ -150,6 +150,8 @@ class FabCircularMenuState extends State } return Container( + height: _screenHeight, + width: _screenWidth, // Removes the default FAB margin transform: widget.removeDefaultFabMargin ? Matrix4.translationValues(16.0, 16.0, 0.0) diff --git a/pubspec.lock b/pubspec.lock index ba6b091..909104c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,42 +5,48 @@ packages: dependency: "direct overridden" description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.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: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: "direct overridden" description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.1" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" flutter: @@ -53,34 +59,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: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: "direct overridden" description: name: meta - url: "https://pub.dartlang.org" + sha256: "12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" path: dependency: "direct overridden" description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" sky_engine: dependency: transitive description: flutter @@ -90,50 +108,57 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" 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.1" + 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.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" vector_math: dependency: "direct main" description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.18.0 <3.0.0" From f5e0e10cd1766b9b37e300fe07814e6179cbd064 Mon Sep 17 00:00:00 2001 From: ericmartineau Date: Fri, 16 Jun 2023 21:32:13 -0700 Subject: [PATCH 16/16] chore: Updates --- example/pubspec.lock | 36 ++++++++++++++++++------------------ example/pubspec.yaml | 2 +- pubspec.lock | 34 +++++++++++++++++----------------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index b316e41..4e759fe 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: "direct overridden" description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: @@ -37,10 +37,10 @@ packages: dependency: "direct overridden" description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" cupertino_icons: dependency: "direct main" description: @@ -52,7 +52,7 @@ packages: fab_circular_menu: dependency: "direct main" description: - path: "/Users/ericm/reliveit/checkout/SunnyApp/fab-circular-menu" + path: "/Users/ericm/aesthetika/checkout/SunnyApp/fab-circular-menu" relative: false source: path version: "1.1.0" @@ -86,26 +86,26 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.15" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "586678f20e112219ed0f73215f01bcdf1d769824ba2ebae45ad918a9bfde9bdb" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.3.0" meta: dependency: "direct overridden" description: name: meta - sha256: "12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" path: dependency: "direct overridden" description: @@ -123,10 +123,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: @@ -163,10 +163,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: daadc9baabec998b062c9091525aa95786508b1c48e9c30f1f891b8bf6ff2e64 url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.2" vector_math: dependency: transitive description: @@ -176,4 +176,4 @@ packages: source: hosted version: "2.1.4" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=3.0.0-0 <4.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 8d2f632..0fbd74f 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,7 +8,7 @@ dependencies: flutter: sdk: flutter fab_circular_menu: - path: /Users/ericm/reliveit/checkout/SunnyApp/fab-circular-menu + path: /Users/ericm/aesthetika/checkout/SunnyApp/fab-circular-menu dev_dependencies: flutter_test: sdk: flutter diff --git a/pubspec.lock b/pubspec.lock index 909104c..33b3129 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: "direct overridden" description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: @@ -37,10 +37,10 @@ packages: dependency: "direct overridden" description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" fake_async: dependency: transitive description: @@ -71,26 +71,26 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.15" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "586678f20e112219ed0f73215f01bcdf1d769824ba2ebae45ad918a9bfde9bdb" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.3.0" meta: dependency: "direct overridden" description: name: meta - sha256: "12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" path: dependency: "direct overridden" description: @@ -108,10 +108,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: @@ -148,10 +148,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: daadc9baabec998b062c9091525aa95786508b1c48e9c30f1f891b8bf6ff2e64 url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.2" vector_math: dependency: "direct main" description: @@ -161,4 +161,4 @@ packages: source: hosted version: "2.1.4" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=3.0.0-0 <4.0.0"