From 094f1d5df0a525c2b9c539738b0e127b0bccbd3f Mon Sep 17 00:00:00 2001 From: AYM1607 Date: Sun, 7 Apr 2019 16:51:41 -0500 Subject: [PATCH] Fixed a bug where the [hideEvent] property of the [TaskListTile] was hiding the edit button and not the event one --- lib/src/widgets/task_list_tile.dart | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/src/widgets/task_list_tile.dart b/lib/src/widgets/task_list_tile.dart index 4ca5717..8803b65 100644 --- a/lib/src/widgets/task_list_tile.dart +++ b/lib/src/widgets/task_list_tile.dart @@ -101,25 +101,27 @@ class TaskListTile extends StatelessWidget { /// Builds the section that contains the 3 buttons for the tile. Widget buildButtonSection() { final bottomRowChildren = []; + + bottomRowChildren.add( + ActionButton( + onPressed: onEditPressed, + text: 'Edit', + leadingIconData: Icons.edit, + ), + ); + if (!hideEventButton) { bottomRowChildren.addAll([ - ActionButton( - onPressed: onEditPressed, - text: 'Edit', - leadingIconData: Icons.edit, - ), SizedBox( width: 4, ), + ActionButton( + onPressed: onEventPressed, + text: 'Event', + leadingIconData: FontAwesomeIcons.calendar, + ), ]); } - bottomRowChildren.add( - ActionButton( - onPressed: onEventPressed, - text: 'Event', - leadingIconData: FontAwesomeIcons.calendar, - ), - ); return Expanded( flex: 5, child: Column(