migration to move achievements to session, prep for achievement and media management

This commit is contained in:
Joshua Burman
2025-01-02 19:50:29 -05:00
parent 48f716cdb0
commit 2206720810
19 changed files with 6771 additions and 186 deletions

View File

@ -20,8 +20,8 @@ Future showGenericDialog(dynamic object, BuildContext parentContext) {
});
}
Future showRemovalDialog(String title, String content, BuildContext context,
dynamic dao, dynamic object) {
Future showCrudDialog(String title, String content, BuildContext context,
dynamic daoCall, dynamic object) {
return showAdaptiveDialog(
context: context,
builder: (BuildContext context) => AlertDialog(
@ -35,10 +35,20 @@ Future showRemovalDialog(String title, String content, BuildContext context,
child: const Text('Cancel'),
),
TextButton(
onPressed: () => {dao.remove(object), Navigator.pop(context, 'OK')},
onPressed: () => {daoCall(object), Navigator.pop(context, 'OK')},
child: const Text('OK'),
),
],
),
);
}
Future showRemovalDialog(String title, String content, BuildContext context,
dynamic dao, dynamic object) {
return showCrudDialog(title, content, context, dao.remove, object);
}
Future showUpdateDialog(String title, String content, BuildContext context,
dynamic dao, dynamic object) {
return showCrudDialog(title, content, context, dao.replace, object);
}