Implement proper handling for inactive/active subscriptions

This commit is contained in:
2025-04-18 00:11:01 +02:00
parent a43a3b441f
commit 63bc71c405
10 changed files with 268 additions and 48 deletions

View File

@@ -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);
}
}