Skip to content

Commit

Permalink
fix formatting (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcsvcn authored Dec 5, 2022
1 parent 5a2e95c commit 786276d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 2.3.0
- Added primaryElevation and secondaryElevation[PR #5](https://github.com/lcsvcn/speed_dial_fab/pull/5)


## 2.2.3
- Fix https://github.com/lcsvcn/speed_dial_fab/issues/4
- Fix [Issue #5](https://github.com/lcsvcn/speed_dial_fab/issues/4)

## 2.2.2
- Fix analysis issues
Expand Down
16 changes: 11 additions & 5 deletions lib/speed_dial_fab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ class SpeedDialFabWidget extends StatefulWidget {
State createState() => SpeedDialFabWidgetState();
}

class SpeedDialFabWidgetState extends State<SpeedDialFabWidget> with TickerProviderStateMixin {
class SpeedDialFabWidgetState extends State<SpeedDialFabWidget>
with TickerProviderStateMixin {
late AnimationController _controller;

@override
Expand All @@ -82,11 +83,13 @@ class SpeedDialFabWidgetState extends State<SpeedDialFabWidget> with TickerProvi
duration: const Duration(milliseconds: 500),
);

if (widget.secondaryIconsList.length != widget.secondaryIconsOnPress.length) {
if (widget.secondaryIconsList.length !=
widget.secondaryIconsOnPress.length) {
throw ("secondaryIconsList should have the same length of secondaryIconsOnPress");
}
if (widget.secondaryIconsText != null) {
if (widget.secondaryIconsText?.length != widget.secondaryIconsOnPress.length) {
if (widget.secondaryIconsText?.length !=
widget.secondaryIconsOnPress.length) {
throw ("secondaryIconsText should have the same length of secondaryIconsOnPress");
}
}
Expand Down Expand Up @@ -137,7 +140,8 @@ class SpeedDialFabWidgetState extends State<SpeedDialFabWidget> with TickerProvi
widget.secondaryIconsList[index],
color: widget.secondaryForegroundColor,
),
onPressed: widget.secondaryIconsOnPress[index] as void Function(),
onPressed:
widget.secondaryIconsOnPress[index] as void Function(),
),
Positioned(
right: 51.0,
Expand Down Expand Up @@ -184,7 +188,9 @@ class SpeedDialFabWidgetState extends State<SpeedDialFabWidget> with TickerProvi
),
alignment: FractionalOffset.center,
child: Icon(
_controller.isDismissed ? widget.primaryIconExpand : widget.primaryIconCollapse,
_controller.isDismissed
? widget.primaryIconExpand
: widget.primaryIconCollapse,
color: widget.primaryForegroundColor,
),
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: speed_dial_fab
description: This is a library that implements the Speed Dial Float Action Button in Flutter. Fell Free to colaborate, every PR is welcome!
repository: https://github.com/lcsvcn/speed_dial_fab.git
homepage: https://github.com/lcsvcn/speed_dial_fab.git
version: 2.2.3
version: 2.3.0

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit 786276d

Please sign in to comment.