|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'dart:io';
|
|
|
|
|
|
|
|
|
|
import 'package:flutter_screenshot_blocker/flutter_screenshot_blocker.dart';
|
|
|
|
|
import 'package:hmg_patient_app/core/model/notifications/get_notifications_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app/theme/colors.dart';
|
|
|
|
|
@ -68,7 +69,16 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
return ScreenshotBlockerWidget(
|
|
|
|
|
blockScreenshots: true, // makes this widget appear black in screenshots
|
|
|
|
|
detectScreenshots: true, // listen for screenshot attempts
|
|
|
|
|
onScreenshotDetected: (event) {
|
|
|
|
|
// event.type → 'screenshot_taken' or 'screenshot_blocked'
|
|
|
|
|
// ScaffoldMessenger.of(context).showSnackBar(
|
|
|
|
|
// SnackBar(content: Text('Screenshots are not allowed!')),
|
|
|
|
|
// );
|
|
|
|
|
},
|
|
|
|
|
child: AppScaffold(
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
showNewAppBar: true,
|
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
|
@ -156,6 +166,7 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|