WD: gradle changes

merge-update-with-lab-changes
taha.alam 1 year ago
parent c6787ff966
commit f52aed49fd

@ -78,7 +78,7 @@ android {
targetSdkVersion 34 targetSdkVersion 34
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
multiDexEnabled true multiDexEnabled false
} }
sourceSets.main { sourceSets.main {
@ -99,6 +99,8 @@ android {
debug { debug {
debuggable true debuggable true
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
shrinkResources false
minifyEnabled false
// ndk { // ndk {
// abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64' // abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
// } // }
@ -194,11 +196,11 @@ dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
// implementation "com.mapbox.maps:android:10.16.6" // implementation "com.mapbox.maps:android:10.16.6"
implementation 'com.mapbox.maps:android:11.3.1' // implementation 'com.mapbox.maps:android:11.3.1'
implementation files('libs/PenNavUI.aar') // implementation files('libs/PenNavUI.aar')
implementation files('libs/Penguin.aar') // implementation files('libs/Penguin.aar')
implementation files('libs/PenguinRenderer.aar') // implementation files('libs/PenguinRenderer.aar')
// implementation "org.jetbrains.anko:anko-commons:0.10.4" // implementation "org.jetbrains.anko:anko-commons:0.10.4"
implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM

@ -41,8 +41,9 @@ buildscript {
classpath 'com.google.gms:google-services:4.3.8' classpath 'com.google.gms:google-services:4.3.8'
// classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' // classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
classpath 'com.huawei.agconnect:agcp:1.5.2.300' classpath 'com.huawei.agconnect:agcp:1.5.2.300'
classpath("com.android.tools:r8:8.2.42")
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
classpath "com.mapbox.gradle.plugins:access-token:0.4.0" // classpath "com.mapbox.gradle.plugins:access-token:0.4.0"
} }
} }
@ -60,20 +61,21 @@ allprojects {
maven { maven {
url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local" url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local"
} }
maven { // maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven' // url 'https://api.mapbox.com/downloads/v2/releases/maven'
//
credentials { // credentials {
username = 'mapbox' // username = 'mapbox'
password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg" //// password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
if (password == null || password == "") { // password = 'pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ'
throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the enviroment variables.") // if (password == null || password == "") {
} // throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the enviroment variables.")
} // }
authentication { // }
basic(BasicAuthentication) // authentication {
} // basic(BasicAuthentication)
} // }
// }
} }
} }

@ -52,7 +52,8 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
), ),
), ),
), ),
inputWidget(TranslationBase.of(context).enterDocName, '', doctorNameController), inputWidget(TranslationBase.of(context).enterDocName, '',
doctorNameController),
], ],
), ),
), ),
@ -84,7 +85,8 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
_searchDoctor(context); _searchDoctor(context);
} }
}, },
child: Text(TranslationBase.of(context).search, style: TextStyle(fontSize: 18.0, color: Colors.white)), child: Text(TranslationBase.of(context).search,
style: TextStyle(fontSize: 18.0, color: Colors.white)),
), ),
), ),
); );
@ -98,50 +100,50 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
var counter = 0; var counter = 0;
var isHmc = false; var isHmc = false;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = []; List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
[];
service.getDoctorsListByName(doctorNameController.text, languageID, context).then((res) async { service
.getDoctorsListByName(doctorNameController.text, languageID, context)
.then((res) async {
// GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
RegionList regionHospitalList = RegionList(); RegionList regionHospitalList = RegionList();
if (res['DoctorList'].length != 0) { if (res['DoctorList'].length != 0) {
res['DoctorList'].forEach((v) { res['DoctorList'].forEach((v) {
var reg = region[counter%4]; var reg = region[counter % 4];
counter++; counter++;
doctorsList.add(new DoctorList.fromJson(v, region: reg,isHMC: isHmc)); doctorsList
isHmc = !isHmc; .add(new DoctorList.fromJson(v, region: reg, isHMC: isHmc));
}); isHmc = !isHmc;
print('the counter is ${ });
counter print('the counter is ${counter}');
}');
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList);
regionHospitalList =
await DoctorMapper.sortList(true, regionHospitalList);
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList); setState(() {});
regionHospitalList = await DoctorMapper.sortList(true, regionHospitalList); // doctorsList.forEach((element) {
// List<PatientDoctorAppointmentList> doctorByHospital =
setState(() { // _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList();
//
}); // if (doctorByHospital.length != 0) {
// doctorsList.forEach((element) { // _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
// List<PatientDoctorAppointmentList> doctorByHospital = // } else {
// _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList(); // _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
// // filterName: element.getProjectCompleteName(),
// if (doctorByHospital.length != 0) { // distanceInKMs: element.projectDistanceInKiloMeters.toString(),
// _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); // projectTopName: element.projectTopName,
// } else { // projectBottomName: element.projectBottomName,
// _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( // patientDoctorAppointment: element));
// filterName: element.getProjectCompleteName(), // }
// distanceInKMs: element.projectDistanceInKiloMeters.toString(), // });
// projectTopName: element.projectTopName, } else {
// projectBottomName: element.projectBottomName, GifLoaderDialogUtils.hideDialog(context);
// patientDoctorAppointment: element)); AppToast.showErrorToast(message: res['ErrorSearchMsg']);
// } }
// });
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorSearchMsg']);
}
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); // navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
@ -173,23 +175,30 @@ setState(() {
_searchDoctor(BuildContext context) { _searchDoctor(BuildContext context) {
getDoctorsList(context); getDoctorsList(context);
context.read<ProjectViewModel>().analytics.appointment.book_appointment_doctor_search(query: doctorNameController.text); context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_doctor_search(query: doctorNameController.text);
} }
navigateToSearchResults(context, RegionList regionHospitalList) { navigateToSearchResults(context, RegionList regionHospitalList) {
// Navigator.push(context, // Navigator.push(context,
// FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,))); // FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,)));
Navigator.push(context, Navigator.push(
FadePage(page: context,
SearchResultsByRegion( FadePage(
page: SearchResultsByRegion(
doctorsList: [], doctorsList: [],
patientDoctorAppointmentListHospital:regionHospitalList, patientDoctorAppointmentListHospital: regionHospitalList,
isLiveCareAppointment: false, isLiveCareAppointment: false,
isDoctorSearchResult: true, isDoctorSearchResult: true,
))); )));
} }
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { Widget inputWidget(
String _labelText, String _hintText, TextEditingController _controller,
{String? prefix, bool isEnable = true, bool hasSelection = false}) {
return Container( return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center, alignment: Alignment.center,

Loading…
Cancel
Save