From 8b718be0259882e725f16336516cb6b191f19763 Mon Sep 17 00:00:00 2001 From: wolcy97 Date: Mon, 10 Feb 2020 15:23:35 +0300 Subject: [PATCH] provide return index when onPressed --- lib/src/fab_menu_item.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/fab_menu_item.dart b/lib/src/fab_menu_item.dart index 8e889f2..6952e51 100644 --- a/lib/src/fab_menu_item.dart +++ b/lib/src/fab_menu_item.dart @@ -1,6 +1,6 @@ part of flutter_fab_dialer; -typedef void OnFabMiniMenuItemPressed(); +typedef void OnFabMiniMenuItemPressed(int index); typedef void HideWidget(); @@ -228,7 +228,7 @@ class FabMenuMiniItemWidget extends StatelessWidget { child: icon, heroTag: "$index", onPressed: () { - onPressed(); + onPressed(index); hideWidget == null ? null : hideWidget(); }) : new FloatingActionButton( @@ -249,7 +249,7 @@ class FabMenuMiniItemWidget extends StatelessWidget { ), heroTag: "$index", onPressed: () { - onPressed(); + onPressed(index); hideWidget == null ? null : hideWidget(); }); }