diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 50ab38d..11decc3 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="hmg.cloudSolutions.mohem"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index d018fec..8edb0f0 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="hmg.cloudSolutions.mohem"> diff --git a/android/gradle.properties b/android/gradle.properties index 56359bf..54e1a43 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,4 @@ -org.gradle.jvmargs=-Xmx1836M +org.gradle.jvmargs=-Xmx2048M android.useAndroidX=true android.enableJetifier=true org.gradle.java.home=/Users/user/Library/Java/JavaVirtualMachines/jbr-17.0.12/Contents/Home/ \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 32f5090..97a5b37 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -144,6 +144,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, C4CFBC4C5CAC00182015ACD5 /* [CP] Embed Pods Frameworks */, + EF29CE25BB57F5AA48CE1136 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -273,6 +274,23 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + EF29CE25BB57F5AA48CE1136 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -363,6 +381,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; @@ -501,6 +520,7 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; @@ -531,6 +551,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; diff --git a/lib/api/dashboard_api_client.dart b/lib/api/dashboard_api_client.dart index 89e7d48..ad6696a 100644 --- a/lib/api/dashboard_api_client.dart +++ b/lib/api/dashboard_api_client.dart @@ -13,6 +13,7 @@ import 'package:mohem_flutter_app/models/generic_response_model.dart'; import 'package:mohem_flutter_app/models/itg/itg_main_response.dart'; import 'package:mohem_flutter_app/models/itg/itg_response_model.dart'; import 'package:platform_device_id/platform_device_id.dart'; +// import 'package:platform_device_id/platform_device_id.dart'; import 'package:uuid/uuid.dart'; class DashboardApiClient { diff --git a/lib/api/my_attendance_api_client.dart b/lib/api/my_attendance_api_client.dart index 37bf9e8..3978c2d 100644 --- a/lib/api/my_attendance_api_client.dart +++ b/lib/api/my_attendance_api_client.dart @@ -91,7 +91,31 @@ class MyAttendanceApiClient { return responseData.getValueSetValuesList ?? []; }, url, postParams); } - + Future> getValueSetValuesSearch(String pSegmentName, String pDescFlexContextCode, String pDescFlexName, List> list, + {String? empID, String? parentValue, bool hasParent = false}) async { + String url = "${ApiConsts.erpRest}GET_VALUE_SET_VALUES_SRCH"; + Map postParams = { + "P_SELECTED_RESP_ID": -999, + "P_MENU_TYPE": "E", + "P_PAGE_LIMIT": 1000, + "P_PAGE_NUM": 1, + "P_PARENT_VALUE": hasParent + ? parentValue + : empID != null + ? parentValue + : null, + "P_SEGMENT_NAME": pSegmentName, + "P_DESC_FLEX_CONTEXT_CODE": pDescFlexContextCode, + "P_DESC_FLEX_NAME": pDescFlexName, + "GetValueSetValuesTBL": list, + }; + postParams.addAll(AppState().postParamsJson); + if (empID != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empID; + return await ApiClient().postJsonForObject((json) { + GenericResponseModel? responseData = GenericResponseModel.fromJson(json); + return responseData.getValueSetValuesList ?? []; + }, url, postParams); + } Future getDefaultValue(String pSegmentName, String pDescFlexContextCode, String pDescFlexName, List> list, {String? empID}) async { String url = "${ApiConsts.erpRest}GET_DEFAULT_VALUE"; Map postParams = { diff --git a/lib/models/dyanmic_forms/get_set_values_request_model.dart b/lib/models/dyanmic_forms/get_set_values_request_model.dart index 07c840a..9f1c52c 100644 --- a/lib/models/dyanmic_forms/get_set_values_request_model.dart +++ b/lib/models/dyanmic_forms/get_set_values_request_model.dart @@ -4,13 +4,15 @@ class GetSetValuesRequestModel { String? dESCRIPTION; String? iDCOLUMNNAME; String? fLEXVALUESETNAME; - + String? pSRCHVALUECOLUMNNAME; GetSetValuesRequestModel( {this.sEGMENTNAME, this.vALUECOLUMNNAME, this.dESCRIPTION, this.iDCOLUMNNAME, - this.fLEXVALUESETNAME}); + this.fLEXVALUESETNAME, + this.pSRCHVALUECOLUMNNAME, + }); GetSetValuesRequestModel.fromJson(Map json) { sEGMENTNAME = json['SEGMENT_NAME']; @@ -18,6 +20,7 @@ class GetSetValuesRequestModel { dESCRIPTION = json['DESCRIPTION']; iDCOLUMNNAME = json['ID_COLUMN_NAME']; fLEXVALUESETNAME = json['FLEX_VALUE_SET_NAME']; + pSRCHVALUECOLUMNNAME = json['P_SRCH_VALUE_COLUMN_NAME']; } Map toJson() { @@ -27,6 +30,7 @@ class GetSetValuesRequestModel { data['DESCRIPTION'] = this.dESCRIPTION; data['ID_COLUMN_NAME'] = this.iDCOLUMNNAME; data['FLEX_VALUE_SET_NAME'] = this.fLEXVALUESETNAME; + data['P_SRCH_VALUE_COLUMN_NAME'] =this.pSRCHVALUECOLUMNNAME; return data; } } diff --git a/lib/models/get_eit_dff_structure_list_model.dart b/lib/models/get_eit_dff_structure_list_model.dart index 05a1535..59736d3 100644 --- a/lib/models/get_eit_dff_structure_list_model.dart +++ b/lib/models/get_eit_dff_structure_list_model.dart @@ -218,14 +218,15 @@ class ESERVICESDV { dynamic pRETURNMSG; String? pRETURNSTATUS; dynamic pVALUECOLUMNNAME; - - ESERVICESDV({this.pIDCOLUMNNAME, this.pRETURNMSG, this.pRETURNSTATUS, this.pVALUECOLUMNNAME}); + dynamic pSRCHVALUECOLUMNNAME; + ESERVICESDV({this.pIDCOLUMNNAME, this.pRETURNMSG, this.pRETURNSTATUS, this.pVALUECOLUMNNAME, this.pSRCHVALUECOLUMNNAME}); ESERVICESDV.fromJson(Map json) { pIDCOLUMNNAME = json['P_ID_COLUMN_NAME']; pRETURNMSG = json['P_RETURN_MSG']; pRETURNSTATUS = json['P_RETURN_STATUS']; pVALUECOLUMNNAME = json['P_VALUE_COLUMN_NAME']; + pSRCHVALUECOLUMNNAME = json['P_SRCH_VALUE_COLUMN_NAME']; } Map toJson() { @@ -234,6 +235,7 @@ class ESERVICESDV { data['P_RETURN_MSG'] = pRETURNMSG; data['P_RETURN_STATUS'] = pRETURNSTATUS; data['P_VALUE_COLUMN_NAME'] = pVALUECOLUMNNAME; + data['P_SRCH_VALUE_COLUMN_NAME'] =pSRCHVALUECOLUMNNAME; return data; } } diff --git a/lib/provider/chat_provider_model.dart b/lib/provider/chat_provider_model.dart index 380278d..474fb51 100644 --- a/lib/provider/chat_provider_model.dart +++ b/lib/provider/chat_provider_model.dart @@ -1685,7 +1685,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { File file = File(path!); file.readAsBytesSync(); path = file.path; - await playerController.preparePlayer(file.path, 1.0); + await playerController.preparePlayer(file.path, 1.0); _timer?.cancel(); notifyListeners(); } diff --git a/lib/ui/chat/common.dart b/lib/ui/chat/common.dart index e0cb4d0..daaeca9 100644 --- a/lib/ui/chat/common.dart +++ b/lib/ui/chat/common.dart @@ -170,7 +170,7 @@ class WaveBubble extends StatelessWidget { padding: EdgeInsets.zero, margin: EdgeInsets.zero, enableSeekGesture: true, - density: 1, + // density: 1, playerWaveStyle: const PlayerWaveStyle( fixedWaveColor: Colors.white, liveWaveColor: MyColors.greenColor, @@ -178,7 +178,7 @@ class WaveBubble extends StatelessWidget { showBottom: true, waveCap: StrokeCap.round, seekLineThickness: 2, - visualizerHeight: 4, + // visualizerHeight: 4, backgroundColor: Colors.transparent, ), ), diff --git a/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart b/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart index f5cae16..00453b2 100644 --- a/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart +++ b/lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart @@ -21,6 +21,8 @@ import 'package:mohem_flutter_app/models/submit_eit_transaction_list_model.dart' import 'package:mohem_flutter_app/ui/misc/request_submit_screen.dart'; import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart'; import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; +import 'package:mohem_flutter_app/widgets/bottom_sheet.dart'; +import 'package:mohem_flutter_app/widgets/bottom_sheets/search_employee_bottom_sheet.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart'; import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart'; @@ -37,7 +39,7 @@ class _DynamicInputScreenState extends State { GenericResponseModel? genericResponseModel; List? getEitDffStructureList; DynamicListViewParams? dynamicParams; - + String? selectedReplacementEmployee; @override void initState() { super.initState(); @@ -686,7 +688,51 @@ class _DynamicInputScreenState extends State { } else { //condition need to be added here. if(model.vSSRCHFLAG =='Y'){ + return DynamicTextFieldWidget( + LocaleKeys.selectEmployee.tr(), + "", + // selectedReplacementEmployee == null ? LocaleKeys.searchForEmployee + // .tr() : selectedReplacementEmployee!.employeeDisplayName ?? "", + isEnable: false, + onTap: () { + showMyBottomSheet( + context, + + callBackFunc: () {}, + child: SearchEmployeeBottomSheet( + title: LocaleKeys.searchForEmployee.tr(), + apiMode: LocaleKeys.delegate.tr(), + fromDynamicScreen: true, + fromChat: false, + onSelectEmployee: (_selectedEmployee) { + // Navigator.pop(context); + // selectedReplacementEmployee = _selectedEmployee; + ESERVICESDV eservicesdv = ESERVICESDV( + pIDCOLUMNNAME:_selectedEmployee.userName, + pRETURNMSG: "null", + pRETURNSTATUS: "null", //getEitDffStructureList![popipIndex].dEFAULTVALUE, + pVALUECOLUMNNAME:_selectedEmployee.employeeDisplayName); + getEitDffStructureList![index].eSERVICESDV = eservicesdv; + + setState(() {}); + }, + onSearchClick: (String empID) async{ + ESERVICESDV eservicesdv = + ESERVICESDV(pSRCHVALUECOLUMNNAME: empID, pRETURNMSG: "null", pRETURNSTATUS: "null", pVALUECOLUMNNAME: ""); + getEitDffStructureList![index].eSERVICESDV = eservicesdv; + setState(() {}); + if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) { + await calGetValueSetValuesSearch(model, empID); + } + if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) { + await getDefaultValues(model); + } + }, + ), + ); + }, + ); }else { return PopupMenuButton( @@ -924,4 +970,65 @@ class _DynamicInputScreenState extends State { } return time; } + Future calGetValueSetValuesSearch(GetEITDFFStructureList structureList,String userID, {bool showLoading = true}) async { + try { + if (showLoading) Utils.showLoading(context); + for (int i = 0; i < (structureList.cHILDSEGMENTSVSSplited?.length ?? 0); i++) { + List> values = []; + String segmentId = structureList.cHILDSEGMENTSVSSplited![i]; + + if (dESCFLEXCONTEXTCODE.isEmpty) dESCFLEXCONTEXTCODE = structureList.dESCFLEXCONTEXTCODE!; + List filteredList = getEitDffStructureList?.where((element) => element.cHILDSEGMENTSVSSplited!.contains(segmentId)).toList() ?? []; + + if (filteredList.isEmpty && structureList.cHILDSEGMENTSVSSplited!.isNotEmpty) { + segmentId = structureList.cHILDSEGMENTSVSSplited![0]; + filteredList = getEitDffStructureList?.where((element) => element.cHILDSEGMENTSVSSplited!.contains(segmentId)).toList() ?? []; + } + values = filteredList + .map((e) => GetSetValuesRequestModel( + sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME, pSRCHVALUECOLUMNNAME: userID ) + .toJson()) + .toList(); + + String? selectedEmp = dynamicParams!.selectedEmp; + bool hasParentId = false; + + if (segmentId.isNotEmpty && selectedEmp == null) { + for (var element in getEitDffStructureList!) { + try { + if (element.sEGMENTNAME == segmentId && selectedEmp == null) { + var selectedElement = element; + if (selectedElement.vALIDATIONTYPE == "Y" || selectedElement.vALIDATIONTYPE == "D") { + hasParentId = true; + break; + } + } + } catch (ex) { + print("err:$ex"); + } + } + } + + List eServicesResponseModel = await MyAttendanceApiClient().getValueSetValuesSearch(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values, + empID: selectedEmp, parentValue: structureList.eSERVICESDV!.pVALUECOLUMNNAME, hasParent: hasParentId); + List abc = genericResponseModel?.getEITDFFStructureList ?? []; + getEitDffStructureList = abc; + int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId); + getEitDffStructureList![index].eSERVICESVS!.clear(); + getEitDffStructureList![index].eSERVICESDV = ESERVICESDV(); + if (eServicesResponseModel.isNotEmpty) getEitDffStructureList![index].eSERVICESVS!.addAll(eServicesResponseModel); + // getEitDffStructureList = genericResponseModel?.getEITDFFStructureList ?? []; + //getEitDffStructureList = getEitDffStructureList!.where((element) => element.dISPLAYFLAG != "N").toList(); + } + if (showLoading) { + await Future.delayed(const Duration(seconds: 1)); + Utils.hideLoading(context); + } + + setState(() {}); + } catch (ex) { + if (showLoading) Utils.hideLoading(context); + Utils.handleException(ex, context, null); + } + } } diff --git a/lib/ui/termination/end_employement.dart b/lib/ui/termination/end_employement.dart index 8837806..18ae916 100644 --- a/lib/ui/termination/end_employement.dart +++ b/lib/ui/termination/end_employement.dart @@ -18,9 +18,12 @@ import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart' import 'package:mohem_flutter_app/models/submit_term_transaction_list_model.dart'; import 'package:mohem_flutter_app/models/termination/get_term_cols_structure_list_model.dart'; import 'package:mohem_flutter_app/models/termination/get_term_dff_structure_list_model.dart'; +import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart'; import 'package:mohem_flutter_app/ui/misc/request_submit_screen.dart'; import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart'; import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; +import 'package:mohem_flutter_app/widgets/bottom_sheet.dart'; +import 'package:mohem_flutter_app/widgets/bottom_sheets/search_employee_bottom_sheet.dart'; import 'package:mohem_flutter_app/widgets/button/default_button.dart'; import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart'; @@ -37,7 +40,7 @@ class _EndEmploymentScreenState extends State { List? termColsList; List? termDffList; DynamicListViewParams? dynamicParams; - + ReplacementList? selectedReplacementEmployee; @override void initState() { super.initState(); @@ -413,9 +416,40 @@ class _EndEmploymentScreenState extends State { await calGetValueSetValues(model); } }, - ).paddingOnly(bottom: 12); + ); } } else { + if(model.sEGMENTNAME =='REPLACEMENT_PERSON') { + return DynamicTextFieldWidget( + LocaleKeys.selectEmployee.tr(), + selectedReplacementEmployee == null ? LocaleKeys.searchForEmployee + .tr() : selectedReplacementEmployee!.employeeDisplayName ?? "", + isEnable: false, + onTap: () { + showMyBottomSheet( + context, + callBackFunc: () {}, + child: SearchEmployeeBottomSheet( + title: LocaleKeys.searchForEmployee.tr(), + apiMode: LocaleKeys.delegate.tr(), + fromChat: false, + onSelectEmployee: (_selectedEmployee) { + // Navigator.pop(context); + selectedReplacementEmployee = _selectedEmployee; + ESERVICESDV eservicesdv = ESERVICESDV( + pIDCOLUMNNAME:_selectedEmployee.userName, + pRETURNMSG: "null", + pRETURNSTATUS: "null", //getEitDffStructureList![popipIndex].dEFAULTVALUE, + pVALUECOLUMNNAME:_selectedEmployee.employeeDisplayName); + termDffList![index].eSERVICESDV = eservicesdv; + + setState(() {}); + }, + ), + ); + }, + ); + }else{ return PopupMenuButton( child: DynamicTextFieldWidget( (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""), @@ -436,11 +470,13 @@ class _EndEmploymentScreenState extends State { pRETURNSTATUS: "null", //getEitDffStructureList![popipIndex].dEFAULTVALUE, pVALUECOLUMNNAME: model.eSERVICESVS![popipIndex].vALUECOLUMNNAME); termDffList![index].eSERVICESDV = eservicesdv; + print(eservicesdv); setState(() {}); if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) { await calGetValueSetValues(model); } }); + } } } else { return const SizedBox(); @@ -455,7 +491,7 @@ class _EndEmploymentScreenState extends State { isPopup: true, isInputTypeNum: true, isReadOnly: model.rEADONLY == "Y", - ).paddingOnly(bottom: 12), + ), itemBuilder: (_) => >[ if (model.rEADONLY != "Y") for (int i = 0; i < model.eSERVICESVS!.length; i++) PopupMenuItem(value: i, child: Text(model.eSERVICESVS![i].vALUECOLUMNNAME!)), diff --git a/lib/widgets/bottom_sheets/search_employee_bottom_sheet.dart b/lib/widgets/bottom_sheets/search_employee_bottom_sheet.dart index d810457..f2f362a 100644 --- a/lib/widgets/bottom_sheets/search_employee_bottom_sheet.dart +++ b/lib/widgets/bottom_sheets/search_employee_bottom_sheet.dart @@ -30,8 +30,9 @@ class SearchEmployeeBottomSheet extends StatefulWidget { String title, apiMode; List? actionHistoryList; Function(ReplacementList) onSelectEmployee; + Function(String)? onSearchClick; bool fromChat; - + bool? fromDynamicScreen; SearchEmployeeBottomSheet({ required this.title, required this.apiMode, @@ -39,6 +40,8 @@ class SearchEmployeeBottomSheet extends StatefulWidget { this.actionHistoryList, required this.onSelectEmployee, required this.fromChat, + this.fromDynamicScreen =false, + this.onSearchClick, }); @override @@ -152,7 +155,12 @@ class _SearchEmployeeBottomSheetState extends State { 21.height, "Search".toText16(), 11.height, - Row( + widget.fromDynamicScreen! ? Row( + children: [ + radioOption( "UserId" , 0, _selectedSearchIndex), + + ], + ) : Row( children: [ radioOption(widget.fromChat ? "UserId" : "Name", 0, _selectedSearchIndex), radioOption("User Name", 1, _selectedSearchIndex), @@ -164,7 +172,7 @@ class _SearchEmployeeBottomSheetState extends State { children: [ DynamicTextFieldWidget( "Search", - "Search By Username", + widget.fromDynamicScreen! ? "Search By UserID" : "Search By Username", inputAction: TextInputAction.done, suffixIconData: Icons.search, onChange: (text) { @@ -175,8 +183,13 @@ class _SearchEmployeeBottomSheetState extends State { IconButton( constraints: const BoxConstraints(), onPressed: () async { - await SystemChannels.textInput.invokeMethod('TextInput.hide'); - widget.fromChat ? fetchChatUser() : fetchUserByInput(); + if(widget.onSearchClick !=null){ + widget.onSearchClick!(searchText); + }else { + await SystemChannels.textInput.invokeMethod( + 'TextInput.hide'); + widget.fromChat ? fetchChatUser() : fetchUserByInput(); + } }, icon: const Icon(Icons.search), ) diff --git a/lib/widgets/location/Location.dart b/lib/widgets/location/Location.dart index 47babca..23ad0cc 100644 --- a/lib/widgets/location/Location.dart +++ b/lib/widgets/location/Location.dart @@ -44,7 +44,7 @@ class Location { AppPermissions.location((granted) { if (granted) { - Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: const Duration(seconds: 5)).then((value) { + Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.lowest, timeLimit: const Duration(seconds: 10)).then((value) { done(value); }).catchError((err) { errorCallBack();