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>[];
bottomRowChildren.add(
ActionButton(
onPressed: onEditPressed,
text: 'Edit',
leadingIconData: Icons.edit,
),
);
if (!hideEventButton) { if (!hideEventButton) {
bottomRowChildren.addAll([ bottomRowChildren.addAll([
ActionButton(
onPressed: onEditPressed,
text: 'Edit',
leadingIconData: Icons.edit,
),
SizedBox( SizedBox(
width: 4, width: 4,
), ),
ActionButton(
onPressed: onEventPressed,
text: 'Event',
leadingIconData: FontAwesomeIcons.calendar,
),
]); ]);
} }
bottomRowChildren.add(
ActionButton(
onPressed: onEventPressed,
text: 'Event',
leadingIconData: FontAwesomeIcons.calendar,
),
);
return Expanded( return Expanded(
flex: 5, flex: 5,
child: Column( child: Column(