CAKE-114 | removed disclaimer alert

This commit is contained in:
OleksandrSobol 2020-10-09 09:20:42 +03:00
parent f6e099eb0a
commit f42e398c80

View file

@ -20,9 +20,8 @@ class DisclaimerPage extends BasePage {
String get title => 'Terms of Use';
@override
Widget leading(BuildContext context) {
return isReadOnly ? super.leading(context) : null;
}
Widget leading(BuildContext context) =>
isReadOnly ? super.leading(context) : null;
@override
Widget body(BuildContext context) => DisclaimerPageBody(isReadOnly: isReadOnly);
@ -55,26 +54,10 @@ class DisclaimerBodyState extends State<DisclaimerPageBody> {
setState(() {});
}
Future<void> _showAlertDialog(BuildContext context) async {
await showPopUp<void>(
context: context,
builder: (BuildContext context) {
return AlertWithOneAction(
alertTitle: 'Terms and conditions',
alertContent: 'By using this app, you agree to the Terms of Agreement set forth to below',
buttonText: S.of(context).ok,
buttonAction: () => Navigator.of(context).pop()
);
});
}
void _afterLayout(Duration _) => _showAlertDialog(context);
@override
void initState() {
super.initState();
getFileLines();
if (!widget.isReadOnly) WidgetsBinding.instance.addPostFrameCallback(_afterLayout);
}
@override