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.
41 lines
1.1 KiB
Dart
41 lines
1.1 KiB
Dart
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
|
import 'package:flutter/material.dart';
|
|
import '../../utils/translations_delegate_base_utils.dart';
|
|
|
|
class ConfirmationDialog extends StatefulWidget {
|
|
final String title;
|
|
final Function onTapGrant;
|
|
|
|
ConfirmationDialog({this.title, this.onTapGrant});
|
|
|
|
@override
|
|
_ConfirmationDialogState createState() => _ConfirmationDialogState();
|
|
}
|
|
|
|
class _ConfirmationDialogState extends State<ConfirmationDialog> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AlertDialog(
|
|
title: Text("Alert"),
|
|
content: Text(widget.title),
|
|
actions: [
|
|
TextButton(
|
|
child: Text(TranslationBase.of(context).cancel),
|
|
onPressed: () {
|
|
Navigator.pop(context);
|
|
},
|
|
),
|
|
TextButton(
|
|
child: Text(TranslationBase.of(context).ok),
|
|
onPressed: () {
|
|
Navigator.pop(context);
|
|
widget.onTapGrant();
|
|
},
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|