more prep work for local data storage
This commit is contained in:
parent
d6e62024d7
commit
13fe7e2ef4
@ -86,7 +86,29 @@ class ActivityCardState extends State<ActivityCard> {
|
||||
},
|
||||
),
|
||||
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'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
)),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
@ -214,6 +214,29 @@ class SessionCard extends StatelessWidget {
|
||||
)),
|
||||
title: Text(maxLines: 1, data.title),
|
||||
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(
|
||||
contentPadding: const EdgeInsets.fromLTRB(15, 0, 15, 15),
|
||||
|
Loading…
x
Reference in New Issue
Block a user