more prep work for local data storage

This commit is contained in:
Joshua Burman 2024-12-08 14:40:12 -05:00
parent d6e62024d7
commit 13fe7e2ef4
2 changed files with 72 additions and 27 deletions

View File

@ -86,7 +86,29 @@ class ActivityCardState extends State<ActivityCard> {
}, },
), ),
subtitle: Text(maxLines: 2, widget.activity.description), subtitle: Text(maxLines: 2, widget.activity.description),
trailing: IconButton(
visualDensity: VisualDensity.compact,
icon: Icon(Icons.close_rounded),
onPressed: () {
showAdaptiveDialog(
context: context,
builder: (BuildContext context) => AlertDialog(
title: const Text('Activity Removal'),
content: const Text('Would you like to permanently remove this activity from the current session?'),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.pop(context, 'Cancel'),
child: const Text('Cancel'),
), ),
TextButton(
onPressed: () => Navigator.pop(context, 'OK'),
child: const Text('OK'),
),
],
),
);
},
)),
], ],
)), )),
); );

View File

@ -214,6 +214,29 @@ class SessionCard extends StatelessWidget {
)), )),
title: Text(maxLines: 1, data.title), title: Text(maxLines: 1, data.title),
subtitle: Text(maxLines: 1, dateFormat.format(data.date)), subtitle: Text(maxLines: 1, dateFormat.format(data.date)),
trailing: IconButton(
visualDensity: VisualDensity.compact,
icon: Icon(Icons.close_rounded),
onPressed: () {
showAdaptiveDialog(
context: context,
builder: (BuildContext context) => AlertDialog(
title: const Text('Session Removal'),
content: const Text('Would you like to permanently remove this session?'),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.pop(context, 'Cancel'),
child: const Text('Cancel'),
),
TextButton(
onPressed: () => Navigator.pop(context, 'OK'),
child: const Text('OK'),
),
],
),
);
},
),
), ),
ListTile( ListTile(
contentPadding: const EdgeInsets.fromLTRB(15, 0, 15, 15), contentPadding: const EdgeInsets.fromLTRB(15, 0, 15, 15),