Skip to content

Commit

Permalink
Fix children buttons not aligned properly
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed Oct 30, 2021
1 parent 6b19c8b commit 6ffc7a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [4.6.6] - 30 October 2021

- Fix web, Platform is not defined
- Fix children buttons not aligned properly
- Update Example

## [4.6.4] - 29 October 2021
Expand Down
19 changes: 11 additions & 8 deletions lib/src/speed_dial.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,20 @@ class _SpeedDialState extends State<SpeedDial>
: Alignment.center,
offset: widget.direction.isDown
? Offset(
widget.switchLabelPosition ||
dialKey.globalPaintBounds == null
? 0
: dialKey.globalPaintBounds!.size.width,
(widget.switchLabelPosition ||
dialKey.globalPaintBounds == null
? 0
: dialKey.globalPaintBounds!.size.width) +
max(widget.childrenButtonSize - 56, 0) / 2,
dialKey.globalPaintBounds!.size.height)
: widget.direction.isUp
? Offset(
widget.switchLabelPosition ||
dialKey.globalPaintBounds == null
? 0
: dialKey.globalPaintBounds!.size.width,
(widget.switchLabelPosition ||
dialKey.globalPaintBounds == null
? 0
: dialKey
.globalPaintBounds!.size.width) +
max(widget.childrenButtonSize - 56, 0) / 2,
0)
: widget.direction.isLeft
? Offset(-10.0,
Expand Down

0 comments on commit 6ffc7a9

Please sign in to comment.