Hibok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
841 B

  1. import 'package:chat/generated/i18n.dart';
  2. import 'package:flutter/material.dart';
  3. class NotPermissionDialog extends StatefulWidget {
  4. final String title;
  5. NotPermissionDialog(this.title);
  6. @override
  7. _NotPermissionDialogState createState() => _NotPermissionDialogState();
  8. }
  9. class _NotPermissionDialogState extends State<NotPermissionDialog> {
  10. @override
  11. Widget build(BuildContext context) {
  12. return AlertDialog(
  13. title: Text(widget.title),
  14. actions: <Widget>[
  15. FlatButton(
  16. onPressed: _onCancel,
  17. child: Text(I18n.of(context).cancel),
  18. ),
  19. FlatButton(
  20. onPressed: _onSure,
  21. child: Text(I18n.of(context).go_open),
  22. ),
  23. ],
  24. );
  25. }
  26. void _onCancel() {
  27. Navigator.pop(context);
  28. }
  29. void _onSure() {
  30. Navigator.pop(context, true);
  31. }
  32. }