1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-29 08:16:28 +00:00
comunicmobile/lib/ui/dialogs/deprecation_dialog.dart

29 lines
938 B
Dart

import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/material.dart';
/// Deprecation dialog
///
/// @author Pierre Hubert
/// Show a dialog to warn the user this version of the application is deprecated
Future<void> showDeprecationDialog(BuildContext context) async {
await showDialog(context: context, builder: (c) => _DeprecationDialog());
}
class _DeprecationDialog extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text(tr("Deprecated application version")),
content: Text(tr(
"This version of the mobile application is deprecated. You might still be able to use it, but some features will not work. We recommend you to update to the latest version of the application.")),
actions: [
MaterialButton(
onPressed: () => Navigator.pop(context),
child: Text(tr("OK")),
)
],
);
}
}