master_new_changes
Aamir 2 years ago
parent 8d9c4091fb
commit 327f9d41b7

@ -21,14 +21,16 @@ class Document {
int? messageStatus; int? messageStatus;
String? message; String? message;
factory Document.fromJson(Map<String, dynamic> json) => Document( factory Document.fromJson(Map<String, dynamic> json) =>
Document(
totalItemsCount: json["totalItemsCount"], totalItemsCount: json["totalItemsCount"],
data: json["data"] == null ? null : List<DocumentData>.from(json["data"].map((x) => DocumentData.fromJson(x))), data: json["data"] == null ? null : List<DocumentData>.from(json["data"].map((x) => DocumentData.fromJson(x))),
messageStatus: json["messageStatus"], messageStatus: json["messageStatus"],
message: json["message"], message: json["message"],
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() =>
{
"totalItemsCount": totalItemsCount, "totalItemsCount": totalItemsCount,
"data": data == null ? null : List<dynamic>.from(data!.map((x) => x.toJson())), "data": data == null ? null : List<dynamic>.from(data!.map((x) => x.toJson())),
"messageStatus": messageStatus, "messageStatus": messageStatus,
@ -50,6 +52,7 @@ class DocumentData {
this.fileExt, this.fileExt,
this.documentName, this.documentName,
this.isLocalFile, this.isLocalFile,
this.description,
}); });
int? id; int? id;
@ -64,8 +67,10 @@ class DocumentData {
String? statusText; String? statusText;
String? documentName; String? documentName;
bool? isLocalFile; bool? isLocalFile;
String? description;
factory DocumentData.fromJson(Map<String, dynamic> json) => DocumentData( factory DocumentData.fromJson(Map<String, dynamic> json) =>
DocumentData(
id: json["id"], id: json["id"],
serviceProviderId: json["serviceProviderID"], serviceProviderId: json["serviceProviderID"],
documentId: json["documentID"], documentId: json["documentID"],
@ -77,9 +82,11 @@ class DocumentData {
document: null, document: null,
fileExt: null, fileExt: null,
documentName: json["documentName"], documentName: json["documentName"],
isLocalFile: false); isLocalFile: false,
description: null);
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() =>
{
"id": id, "id": id,
"serviceProviderID": serviceProviderId, "serviceProviderID": serviceProviderId,
"documentID": documentId, "documentID": documentId,

@ -27,10 +27,12 @@ abstract class PaymentService {
class PaymentServiceImp implements PaymentService { class PaymentServiceImp implements PaymentService {
MyInAppBrowser? myInAppBrowser; MyInAppBrowser? myInAppBrowser;
var inAppBrowserOptions = InAppBrowserClassOptions( var inAppBrowserOptions = InAppBrowserClassOptions(
inAppWebViewGroupOptions: InAppWebViewGroupOptions(crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), ios: IOSInAppWebViewOptions(applePayAPIEnabled: true)), inAppWebViewGroupOptions:
InAppWebViewGroupOptions(crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), ios: IOSInAppWebViewOptions(applePayAPIEnabled: true)),
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black), crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
android: AndroidInAppBrowserOptions(), android: AndroidInAppBrowserOptions(),
ios: IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN)); ios:
IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
String getUrlRequestByPaymentId({required int id, List<int>? appointmentIds, required PaymentTypes paymentType}) { String getUrlRequestByPaymentId({required int id, List<int>? appointmentIds, required PaymentTypes paymentType}) {
String urlRequest = ""; String urlRequest = "";
@ -87,7 +89,7 @@ class PaymentServiceImp implements PaymentService {
onBrowserLoadStart(onFailure: onFailure, onSuccess: onSuccess, url: url); onBrowserLoadStart(onFailure: onFailure, onSuccess: onSuccess, url: url);
}); });
await myInAppBrowser!.openUrlRequest( await myInAppBrowser!.openUrlRequest(
urlRequest: URLRequest(url: Uri.parse(urlRequest)), urlRequest: URLRequest(url: WebUri(urlRequest, forceToStringRawValue: true)),
options: inAppBrowserOptions, options: inAppBrowserOptions,
); );
} }

@ -162,6 +162,10 @@ class _ProviderLicensePageState extends State<ProviderLicensePage> {
hint: LocaleKeys.description.tr(), hint: LocaleKeys.description.tr(),
maxLines: 3, maxLines: 3,
isBackgroundEnabled: true, isBackgroundEnabled: true,
value: document.description != null ? document.description : "",
onChanged: (val) {
document.description = val;
},
), ),
], ],
10.height, 10.height,
@ -184,7 +188,8 @@ class _ProviderLicensePageState extends State<ProviderLicensePage> {
}, },
), ),
buildCommentContainer(document: document), buildCommentContainer(document: document),
] else ...[ ] else
...[
10.height, 10.height,
DottedRectContainer( DottedRectContainer(
onTap: () => serviceVM.pickPdfReceiptFile(context, document.documentId!, index) ?? "", onTap: () => serviceVM.pickPdfReceiptFile(context, document.documentId!, index) ?? "",

Loading…
Cancel
Save