|
|
|
|
@ -4,6 +4,7 @@ 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/notifications_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app/locator.dart';
|
|
|
|
|
import 'package:hmg_patient_app/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:hmg_patient_app/uitl/translations_delegate_base.dart';
|
|
|
|
|
@ -62,7 +63,7 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
|
|
|
|
|
videoId = YoutubePlayer.convertUrlToId(widget.notification.videoURL)!;
|
|
|
|
|
print(videoId); // BBAyRBTfsOU
|
|
|
|
|
return videoId;
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -70,11 +71,17 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
NotificationViewModel notificationViewModel = Provider.of(context);
|
|
|
|
|
notificationViewModel.markAsRead(widget.notification.id);
|
|
|
|
|
// NotificationViewModel notificationViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
|
|
// notificationViewModel.markAsRead(widget.notification.id);
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.isLogin) {
|
|
|
|
|
locator<NotificationViewModel>().markAsRead(widget.notification.id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ScreenshotBlockerWidget(
|
|
|
|
|
blockScreenshots: true, // makes this widget appear black in screenshots
|
|
|
|
|
detectScreenshots: true, // listen for screenshot attempts
|
|
|
|
|
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(
|
|
|
|
|
@ -87,6 +94,9 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
|
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
|
isShowDecPage: false,
|
|
|
|
|
appBarTitle: TranslationBase.of(context).notificationDetails,
|
|
|
|
|
onTap: () {
|
|
|
|
|
print("onTap");
|
|
|
|
|
},
|
|
|
|
|
body: ListView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.all(21),
|
|
|
|
|
|