Implement proper handling for inactive/active subscriptions
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class UIDialogs {
|
||||
|
||||
static Future<String?> showTextInput(BuildContext context, String title, String hintText) {
|
||||
var _textFieldController = TextEditingController();
|
||||
|
||||
@@ -26,4 +27,25 @@ class UIDialogs {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static Future<bool> showConfirmDialog(BuildContext context, String title, {String? text, String? okText, String? cancelText}) {
|
||||
return showDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(title),
|
||||
content: (text != null) ? Text(text) : null,
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(false),
|
||||
child: Text(cancelText ?? 'Cancel'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(true),
|
||||
child: Text(okText ?? 'OK'),
|
||||
),
|
||||
],
|
||||
),
|
||||
).then((value) => value ?? false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user