Fixed a bug where the [hideEvent] property of the [TaskListTile] was hiding the edit button and not the event one

This commit is contained in:
Mariano Uvalle 2019-04-07 16:51:41 -05:00
parent 0946705032
commit 094f1d5df0

View file

@ -101,25 +101,27 @@ class TaskListTile extends StatelessWidget {
/// Builds the section that contains the 3 buttons for the tile. /// Builds the section that contains the 3 buttons for the tile.
Widget buildButtonSection() { Widget buildButtonSection() {
final bottomRowChildren = <Widget>[]; final bottomRowChildren = <Widget>[];
if (!hideEventButton) {
bottomRowChildren.addAll([ bottomRowChildren.add(
ActionButton( ActionButton(
onPressed: onEditPressed, onPressed: onEditPressed,
text: 'Edit', text: 'Edit',
leadingIconData: Icons.edit, leadingIconData: Icons.edit,
), ),
);
if (!hideEventButton) {
bottomRowChildren.addAll([
SizedBox( SizedBox(
width: 4, width: 4,
), ),
]);
}
bottomRowChildren.add(
ActionButton( ActionButton(
onPressed: onEventPressed, onPressed: onEventPressed,
text: 'Event', text: 'Event',
leadingIconData: FontAwesomeIcons.calendar, leadingIconData: FontAwesomeIcons.calendar,
), ),
); ]);
}
return Expanded( return Expanded(
flex: 5, flex: 5,
child: Column( child: Column(