mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Show deprecation warning
This commit is contained in:
		
							
								
								
									
										28
									
								
								lib/ui/dialogs/deprecation_dialog.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								lib/ui/dialogs/deprecation_dialog.dart
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
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")),
 | 
			
		||||
        )
 | 
			
		||||
      ],
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user