Updates To 3.10
commit
42c3b7a8af
@ -0,0 +1,6 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQg+oBl9YdOiMRXfQZe
|
||||||
|
nIe6tR1tojoOvvcohNJmJtH+SsagCgYIKoZIzj0DAQehRANCAATDY9E82MAgMI/g
|
||||||
|
bKF1t4zLHJ1Yt9uoOnedNYsfyZLhh3l3ZyXRj02uDXz04AsNbNFjkLJXPc4xY9ad
|
||||||
|
+A4rY70x
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
class GetNotificationsResponseModel {
|
||||||
|
int? id;
|
||||||
|
int? recordId;
|
||||||
|
int? patientID;
|
||||||
|
bool? projectOutSA;
|
||||||
|
String? deviceType;
|
||||||
|
String? deviceToken;
|
||||||
|
String? message;
|
||||||
|
String? messageType;
|
||||||
|
String? messageTypeData;
|
||||||
|
dynamic videoURL;
|
||||||
|
bool? isQueue;
|
||||||
|
String? isQueueOn;
|
||||||
|
String? createdOn;
|
||||||
|
String? createdBy;
|
||||||
|
String? notificationType;
|
||||||
|
bool? isSent;
|
||||||
|
String? isSentOn;
|
||||||
|
bool? isRead;
|
||||||
|
String? isReadOn;
|
||||||
|
int? channelID;
|
||||||
|
int? projectID;
|
||||||
|
|
||||||
|
GetNotificationsResponseModel(
|
||||||
|
{this.id,
|
||||||
|
this.recordId,
|
||||||
|
this.patientID,
|
||||||
|
this.projectOutSA,
|
||||||
|
this.deviceType,
|
||||||
|
this.deviceToken,
|
||||||
|
this.message,
|
||||||
|
this.messageType,
|
||||||
|
this.messageTypeData,
|
||||||
|
this.videoURL,
|
||||||
|
this.isQueue,
|
||||||
|
this.isQueueOn,
|
||||||
|
this.createdOn,
|
||||||
|
this.createdBy,
|
||||||
|
this.notificationType,
|
||||||
|
this.isSent,
|
||||||
|
this.isSentOn,
|
||||||
|
this.isRead,
|
||||||
|
this.isReadOn,
|
||||||
|
this.channelID,
|
||||||
|
this.projectID});
|
||||||
|
|
||||||
|
GetNotificationsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['Id'];
|
||||||
|
recordId = json['RecordId'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
projectOutSA = json['ProjectOutSA'];
|
||||||
|
deviceType = json['DeviceType'];
|
||||||
|
deviceToken = json['DeviceToken'];
|
||||||
|
message = json['Message'];
|
||||||
|
messageType = json['MessageType'];
|
||||||
|
messageTypeData = json['MessageTypeData'];
|
||||||
|
videoURL = json['VideoURL'];
|
||||||
|
isQueue = json['IsQueue'];
|
||||||
|
isQueueOn = json['IsQueueOn'];
|
||||||
|
createdOn = json['CreatedOn'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
notificationType = json['NotificationType'];
|
||||||
|
isSent = json['IsSent'];
|
||||||
|
isSentOn = json['IsSentOn'];
|
||||||
|
isRead = json['IsRead'];
|
||||||
|
isReadOn = json['IsReadOn'];
|
||||||
|
channelID = json['ChannelID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Id'] = this.id;
|
||||||
|
data['RecordId'] = this.recordId;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['ProjectOutSA'] = this.projectOutSA;
|
||||||
|
data['DeviceType'] = this.deviceType;
|
||||||
|
data['DeviceToken'] = this.deviceToken;
|
||||||
|
data['Message'] = this.message;
|
||||||
|
data['MessageType'] = this.messageType;
|
||||||
|
data['MessageTypeData'] = this.messageTypeData;
|
||||||
|
data['VideoURL'] = this.videoURL;
|
||||||
|
data['IsQueue'] = this.isQueue;
|
||||||
|
data['IsQueueOn'] = this.isQueueOn;
|
||||||
|
data['CreatedOn'] = this.createdOn;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['NotificationType'] = this.notificationType;
|
||||||
|
data['IsSent'] = this.isSent;
|
||||||
|
data['IsSentOn'] = this.isSentOn;
|
||||||
|
data['IsRead'] = this.isRead;
|
||||||
|
data['IsReadOn'] = this.isReadOn;
|
||||||
|
data['ChannelID'] = this.channelID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:lottie/lottie.dart';
|
||||||
|
import 'package:mohem_flutter_app/models/get_notifications_response_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||||
|
|
||||||
|
class NotificationsDetailsPage extends StatefulWidget {
|
||||||
|
final GetNotificationsResponseModel notification;
|
||||||
|
|
||||||
|
NotificationsDetailsPage({required this.notification});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<NotificationsDetailsPage> createState() => _NotificationsDetailsPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
appBar: AppBarWidget(
|
||||||
|
context,
|
||||||
|
title: "Notification Details",
|
||||||
|
),
|
||||||
|
body: ListView(
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
padding: EdgeInsets.all(21),
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
widget.notification.createdOn!,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Color(0xff2E303A),
|
||||||
|
letterSpacing: -0.64,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (widget.notification.messageTypeData != null)
|
||||||
|
if (widget.notification.messageTypeData!.isNotEmpty && widget.notification.notificationType != "2")
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 18),
|
||||||
|
child: Image.network(widget.notification.messageTypeData!, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) {
|
||||||
|
if (loadingProgress == null) return child;
|
||||||
|
return Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 40.0,
|
||||||
|
height: 40.0,
|
||||||
|
child: showLoadingAnimation(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, fit: BoxFit.fill),
|
||||||
|
),
|
||||||
|
SizedBox(height: 18),
|
||||||
|
Text(
|
||||||
|
widget.notification.message!.trim(),
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Color(0xff575757),
|
||||||
|
letterSpacing: -0.48,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget showLoadingAnimation() {
|
||||||
|
return Lottie.asset(
|
||||||
|
'assets/lottie/loading.json',
|
||||||
|
repeat: true,
|
||||||
|
reverse: false,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue