From c9d0d3a04a29a6915eb9fb3ea81916621cb23a06 Mon Sep 17 00:00:00 2001 From: Lachlan Grant Date: Thu, 28 Oct 2021 10:04:26 +1000 Subject: [PATCH] Fix for #213, adding horizontal padding when the size is larger then 56 This aligns child buttons with the center of the FAB. --- lib/src/speed_dial.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/speed_dial.dart b/lib/src/speed_dial.dart index b58575b..4e91665 100644 --- a/lib/src/speed_dial.dart +++ b/lib/src/speed_dial.dart @@ -363,6 +363,12 @@ class _SpeedDialState extends State child: Material( type: MaterialType.transparency, child: Container( + padding: EdgeInsets.symmetric( + horizontal: + widget.direction.isUp || widget.direction.isDown + ? max(widget.buttonSize - 56, 0) / 2 + : 0, + ), margin: widget.spacing != null ? EdgeInsets.fromLTRB( widget.direction.isRight ? widget.spacing! : 0,