Merge branch 'master_mohemm_flutter' into development_haroon

merge-requests/3/head
haroon amjad 3 years ago
commit 5eb82d04ae

@ -21,7 +21,6 @@ import 'package:mohem_flutter_app/widgets/loading_dialog.dart';
import 'package:nfc_manager/nfc_manager.dart';
import 'package:nfc_manager/platform_tags.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:store_checker/store_checker.dart';
// ignore_for_file: avoid_annotating_with_dynamic

@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
@ -71,27 +72,31 @@ class _RequestSubmitScreenState extends State<RequestSubmitScreen> {
}
}
void submitRequest() async {
try {
Utils.showLoading(context);
Future<List<Map<String, dynamic>>> addAttachments() async {
List<Map<String, dynamic>> list = [];
if (attachmentFiles.isNotEmpty) {
attachments.asMap().forEach((index, value) async {
attachmentFiles.asMap().forEach((index, value) {
String type = attachmentFiles[index].path.split('.').last;
String name = attachmentFiles[index].path.split('/').last;
// List<int> fileContent = await value.readAsBytes();
// String encodedFile = base64Encode(fileContent);
List<int> fileContent = value.readAsBytesSync();
String encodedFile = base64Encode(fileContent);
list.add(AttachmentModel(
attachmentID: index,
pFILECONTENTTYPE: type,
pFILENAME: name,
pFILEDATA: value,
pFILEDATA: encodedFile,
pTRANSACTIONID: params!.transactionId,
).toJson());
});
}
await MyAttendanceApiClient().addAttachment(list);
return list;
}
void submitRequest() async {
try {
Utils.showLoading(context);
List<Map<String, dynamic>> list = await addAttachments();
await MyAttendanceApiClient().addAttachment(list);
if (params!.approvalFlag == 'phone_numbers') {
await ProfileApiClient().startPhoneApprovalProcess(
"SUBMIT",

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
@ -107,22 +105,34 @@ class _ItemForSaleDetailPageState extends State<ItemForSaleDetailPage> {
).expanded,
Row(
children: [
DefaultButton("Email", () async {
DefaultButton(
"Email",
getItemsForSaleList.status == 'Approved'
? () async {
Uri emailLaunchUri = Uri(
scheme: 'mailto',
path: getItemsForSaleList.emailAddress,
);
launchUrl(emailLaunchUri);
}, iconData: Icons.email_sharp, isTextExpanded: false)
}
: null,
iconData: Icons.email_sharp,
isTextExpanded: false)
.expanded,
8.width,
DefaultButton("Call", () async {
DefaultButton(
"Call",
getItemsForSaleList.status == 'Approved'
? () async {
Uri callLaunchUri = Uri(
scheme: 'tel',
path: getItemsForSaleList.mobileNumber,
);
launchUrl(callLaunchUri);
}, iconData: Icons.call_sharp, isTextExpanded: false)
}
: null,
iconData: Icons.call_sharp,
isTextExpanded: false)
.expanded,
],
).insideContainer,

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 3.2.91+300030
version: 3.2.93+300032
environment:
sdk: ">=2.16.0 <3.0.0"
@ -114,7 +114,7 @@ dependencies:
carousel_slider: ^4.2.1
#Huawei Specified
store_checker: ^1.1.0
# store_checker: ^1.1.0
google_api_availability: ^3.0.1

Loading…
Cancel
Save