fix new version applocalization
This commit is contained in:
29
covas_mobile_old/lib/classes/alert.dart
Normal file
29
covas_mobile_old/lib/classes/alert.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
mixin ShowAlertDialog {
|
||||
void showAlertDialog(BuildContext context, String title, String text) {
|
||||
// Create AlertDialog
|
||||
AlertDialog dialog = AlertDialog(
|
||||
title: Text(title),
|
||||
content: Text(text),
|
||||
actions: [
|
||||
ElevatedButton(
|
||||
child: Text("OK"),
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: EdgeInsets.symmetric(horizontal: 50, vertical: 20),
|
||||
textStyle:
|
||||
TextStyle(fontSize: 15, fontWeight: FontWeight.normal)),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop("Yes, Of course!"); // Return value
|
||||
}),
|
||||
],
|
||||
);
|
||||
|
||||
// Call showDialog function to show dialog.
|
||||
Future futureValue = showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return dialog;
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user