diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ceabb..d3b839f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [4.4.0+2] - 5 October 2021 + +- Added the RotationAngle for the Icon Animation + ## [4.4.0+1] - 23 September 2021 - Update flutter sdk constraints diff --git a/lib/src/speed_dial.dart b/lib/src/speed_dial.dart index 62c0ce5..89429b4 100644 --- a/lib/src/speed_dial.dart +++ b/lib/src/speed_dial.dart @@ -56,6 +56,9 @@ class SpeedDial extends StatefulWidget { /// If true then rotation animation will be used when animating b/w activeIcon and icon. final bool useRotationAnimation; + /// The angle of the iconRotation + final double animationAngle; + /// The theme for the icon generally includes color and size. final IconThemeData? iconTheme; @@ -147,6 +150,7 @@ class SpeedDial extends StatefulWidget { this.activeChild, this.switchLabelPosition = false, this.useRotationAnimation = true, + this.animationAngle = pi / 2, this.iconTheme, this.label, this.activeLabel, @@ -436,7 +440,7 @@ class _SpeedDialState extends State angle: (widget.activeChild != null || widget.activeIcon != null) && widget.useRotationAnimation - ? _controller.value * pi / 2 + ? _controller.value * widget.animationAngle : 0, child: AnimatedSwitcher( duration: Duration(milliseconds: widget.animationSpeed), diff --git a/pubspec.yaml b/pubspec.yaml index 67cd172..95850a9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_speed_dial description: Flutter plugin to implement a beautiful and dynamic Material Design Speed Dial with labels, animated icons, multi-directional children and much more. -version: 4.4.0+1 +version: 4.4.0+2 homepage: https://github.com/darioielardi/flutter_speed_dial/ dependencies: