You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
952 B
Dart
35 lines
952 B
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class AAlertDialog extends StatelessWidget {
|
|
final String title;
|
|
final String content;
|
|
|
|
const AAlertDialog({Key key, this.title, this.content}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// Subtitle _subtitle = AppLocalization.of(context).subtitle;
|
|
return CupertinoAlertDialog(
|
|
title: title != null ? Text(title) : null,
|
|
content: content != null ? Text(content) : null,
|
|
actions: <Widget>[
|
|
TextButton(
|
|
// child: Text(_subtitle.confirm),
|
|
child: const Text("Confirm"),
|
|
onPressed: () {
|
|
Navigator.of(context).pop(true);
|
|
},
|
|
),
|
|
TextButton(
|
|
// child: Text(_subtitle.cancel),
|
|
child: const Text("Cancel"),
|
|
onPressed: () {
|
|
Navigator.of(context).pop(false);
|
|
},
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|