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.
cloudsolutions-atoms/lib/views/widgets/dialogs/dialog.dart

36 lines
982 B
Dart

3 years ago
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
2 years ago
import 'package:test_sa/extensions/context_extension.dart';
3 years ago
class AAlertDialog extends StatelessWidget {
final String? title;
final String? content;
3 years ago
const AAlertDialog({Key? key, this.title, this.content}) : super(key: key);
3 years ago
@override
Widget build(BuildContext context) {
//
3 years ago
return CupertinoAlertDialog(
title: title != null ? Text(title!) : null,
content: content != null ? Text(content!) : null,
3 years ago
actions: <Widget>[
TextButton(
// child: Text(_subtitle.confirm),
2 years ago
child: Text(context.translation.confirm),
3 years ago
onPressed: () {
Navigator.of(context).pop(true);
},
),
TextButton(
// child: Text(_subtitle.cancel),
2 years ago
child: Text(context.translation.cancel),
3 years ago
onPressed: () {
Navigator.of(context).pop(false);
},
),
],
);
}
}