V2 Release

This commit is contained in:
Ujwal223
2026-05-25 22:12:38 +05:45
parent 2d33dcb889
commit 842dc70829
38 changed files with 642 additions and 334 deletions
+36
View File
@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';
import '../services/remote_popup_service.dart';
class RemotePopupHandler {
static Future<void> checkAndShow(BuildContext context) async {
final popup = await RemotePopupService.fetchPopup();
if (popup == null) return;
final shouldShow = await RemotePopupService.shouldShow(popup);
if (!shouldShow) return;
await RemotePopupService.markShown(popup);
if (!context.mounted) return;
showDialog(
context: context,
barrierDismissible: true,
builder: (_) {
return AlertDialog(
title: Text(popup.title),
content: Text(popup.body),
actions: [
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: Text(popup.buttonText),
),
],
);
},
);
}
}