|
|
|
@ -1,5 +1,6 @@
|
|
|
|
import 'dart:io';
|
|
|
|
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/model/notifications/get_notifications_response_model.dart';
|
|
|
|
import 'package:hmg_patient_app/core/viewModels/notifications_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app/core/viewModels/notifications_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app/core/viewModels/project_view_model.dart';
|
|
|
|
@ -71,7 +72,16 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
NotificationViewModel notificationViewModel = Provider.of(context);
|
|
|
|
NotificationViewModel notificationViewModel = Provider.of(context);
|
|
|
|
notificationViewModel.markAsRead(widget.notification.id);
|
|
|
|
notificationViewModel.markAsRead(widget.notification.id);
|
|
|
|
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,
|
|
|
|
isShowAppBar: true,
|
|
|
|
showNewAppBar: true,
|
|
|
|
showNewAppBar: true,
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
@ -159,6 +169,7 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|