Skip to content

Commit

Permalink
Remove code for cancel button on IC page
Browse files Browse the repository at this point in the history
This approach is pretty bad as both the cancel and the cross button does the thing, and it is not something we can control on the frontend.
  • Loading branch information
LarsRefsgaard committed Jul 19, 2023
1 parent a6e187d commit 2d3dd4a
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions lib/ui/pages/informed_consent_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,6 @@ class InformedConsentState extends State<InformedConsentPage> {
}
}

void cancelCallback(RPTaskResult? result) async {
info("$runtimeType - Informed Consent canceled");

await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
RPLocalizations locale = RPLocalizations.of(context)!;

return AlertDialog(
title: Text(locale.translate("pages.ic.need_accept")),
actions: <Widget>[
TextButton(
child: Text(locale.translate("pages.ic.go_to_ic")),
onPressed: () {
context.go('/consent');
},
)
],
);
},
);
}

@override
Widget build(BuildContext context) {
RPLocalizations localization = RPLocalizations.of(context)!;
Expand All @@ -64,7 +40,6 @@ class InformedConsentState extends State<InformedConsentPage> {
return RPUITask(
task: snapshot.data!,
onSubmit: resultCallback,
onCancel: cancelCallback,
);
}
}
Expand Down

0 comments on commit 2d3dd4a

Please sign in to comment.