Subs Push

aamir_dev
Faiz Hashmi 1 year ago
parent 6e74801852
commit b2494d00ab

@ -196,7 +196,14 @@ class BranchRepoImp implements BranchRepo {
List<Map<String, dynamic>> map = [];
for (int i = 0; i < documents!.length; i++) {
if (documents[i].document != null) {
var postParams = {"id": documents[i].id, "serviceProviderID": documents[i].serviceProviderId, "documentID": documents[i].documentId, "documentExt": documents[i].fileExt, "documentImage": documents[i].document, "isActive": true};
var postParams = {
"id": documents[i].id,
"serviceProviderID": documents[i].serviceProviderId,
"documentID": documents[i].documentId,
"documentExt": documents[i].fileExt,
"documentImage": documents[i].document,
"isActive": true,
};
map.add(postParams);
}
}

@ -243,7 +243,6 @@ class ServiceVM extends BaseVM {
}
Future<void> commerceRemove(String filePath) async {
log("commerceRemove with: $filePath");
int index = commerceCertificates.indexWhere((element) => element.filePath == filePath);
if (index == -1) {
return;
@ -253,8 +252,6 @@ class ServiceVM extends BaseVM {
}
Future<void> commercialRemove(String filePath) async {
log("commercialRemove with: $filePath");
int index = commercialCertificates.indexWhere((element) => element.filePath == filePath);
if (index == -1) {
return;
@ -264,8 +261,6 @@ class ServiceVM extends BaseVM {
}
Future<void> vatRemove(String filePath) async {
log("vatRemove with: $filePath");
int index = vatCertificates.indexWhere((element) => element.filePath == filePath);
if (index == -1) {
return;

@ -170,7 +170,7 @@ class _ProviderLicensePageState extends State<ProviderLicensePage> {
isReview: document.status == 4,
allowAdButton: false,
pickedFiles: isLocalOrNetworkFiles(model: serviceVM, document: document),
onCrossPressedPrimary: chkIsLocalOrNetwork(document: document)
onCrossPressedPrimary: isNetworkImage(document: document)
? serviceVM.removeNetworkImage
: document.documentId == 1
? serviceVM.commerceRemove
@ -200,6 +200,7 @@ class _ProviderLicensePageState extends State<ProviderLicensePage> {
List<ImageModel> isLocalOrNetworkFiles({required ServiceVM model, required DocumentData document}) {
bool isNetworkImage = false;
if (!document.isLocalFile!) {
isNetworkImage = document.documentUrl != null && document.documentUrl!.isNotEmpty ? true : false;
}
@ -217,7 +218,6 @@ class _ProviderLicensePageState extends State<ProviderLicensePage> {
bool isNeedToShow({required ServiceVM model, required DocumentData document}) {
bool allow = false;
bool isNetworkImage = document.documentUrl != null && document.documentUrl!.isNotEmpty && !(document.isLocalFile ?? true);
log("document.documentUrl: ${document.documentUrl}");
if (isNetworkImage) {
allow = true;
} else {
@ -251,7 +251,7 @@ class _ProviderLicensePageState extends State<ProviderLicensePage> {
}
}
bool chkIsLocalOrNetwork({required DocumentData document}) {
bool isNetworkImage({required DocumentData document}) {
bool isNetworkImage = false;
if (!document.isLocalFile!) {
isNetworkImage = document.documentUrl != null && document.documentUrl!.isNotEmpty ? true : false;

Loading…
Cancel
Save