diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 8101281..80cb209 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -19,6 +19,7 @@ ().setAppType(AppType.provider); + AppState().setPostParamsModel( PostParamsModel( languageID: EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2, ), ); - ThemeData data = AppTheme.getTheme(isArabic: EasyLocalization.of(context)?.locale.languageCode == "ar"); + // ThemeData data = AppTheme.getTheme(isArabic: EasyLocalization.of(context)?.locale.languageCode == "ar"); return MaterialApp( theme: AppTheme.getTheme(isArabic: EasyLocalization.of(context)?.locale.languageCode == "ar"), debugShowCheckedModeBanner: false, diff --git a/lib/views/dashboard/fragments/home_fragment.dart b/lib/views/dashboard/fragments/home_fragment.dart index f63dce9..5a045f3 100644 --- a/lib/views/dashboard/fragments/home_fragment.dart +++ b/lib/views/dashboard/fragments/home_fragment.dart @@ -56,30 +56,35 @@ class HomeFragment extends StatelessWidget { child: RefreshIndicator( onRefresh: () async => await context.read().onRefresh(context), child: ListView( + padding: EdgeInsets.zero, children: [ - 10.height, - ViewAllWidget( - title: LocaleKeys.upcoming_appointment.tr(), - subTitle: LocaleKeys.view_all.tr(), - onSubtitleTapped: () { - context.read().onNavbarTapped(1); - }).horPaddingMain(), - // const AppointmentSliderWidget().horPaddingMain(), - CommonAppointmentSliderWidget( - onAppointmentClick: (AppointmentListModel value) { - navigateWithName(context, ProviderAppRoutes.appointmentDetailList, arguments: value); - }, - ), - 21.height, - ViewAllWidget( - title: LocaleKeys.myBranches.tr(), - subTitle: LocaleKeys.view_all.tr(), - onSubtitleTapped: () { - context.read().onNavbarTapped(0); - }, - ).horPaddingMain(), - const ServiceProviderWidget().horPaddingMain(), - + Column( + children: [ + 10.height, + ViewAllWidget( + title: LocaleKeys.upcoming_appointment.tr(), + subTitle: LocaleKeys.view_all.tr(), + onSubtitleTapped: () { + context.read().onNavbarTapped(1); + }).horPaddingMain(), + // const AppointmentSliderWidget().horPaddingMain(), + CommonAppointmentSliderWidget( + onAppointmentClick: (AppointmentListModel value) { + navigateWithName(context, ProviderAppRoutes.appointmentDetailList, arguments: value); + }, + ).horPaddingMain(), + //margin: const EdgeInsets.only(bottom: 10, left: 21, right: 21), + 24.height, + ViewAllWidget( + title: LocaleKeys.myBranches.tr(), + subTitle: LocaleKeys.view_all.tr(), + onSubtitleTapped: () { + context.read().onNavbarTapped(0); + }, + ).horPaddingMain(), + const ServiceProviderWidget().horPaddingMain(), + ], + ).toWhiteContainer(width: double.infinity), Consumer( builder: (BuildContext context, AdVM adVM, Widget? child) { if (adVM.state == ViewState.busy) { @@ -134,7 +139,7 @@ class HomeFragment extends StatelessWidget { ); } }, - ), + ).toContainer(backgroundColor: Color(0xFFF8F8F8), padding: EdgeInsets.zero, margin: EdgeInsets.zero), 21.height, ], ), diff --git a/lib/views/dashboard/widget/my_service_provider.dart b/lib/views/dashboard/widget/my_service_provider.dart index 8ceda29..7e83d7c 100644 --- a/lib/views/dashboard/widget/my_service_provider.dart +++ b/lib/views/dashboard/widget/my_service_provider.dart @@ -37,23 +37,31 @@ class ServiceProviderWidget extends StatelessWidget { shrinkWrap: true, itemBuilder: (BuildContext context, int index) { BranchDetailModel branchDetailModel = model.branches!.data!.serviceProviderBranch![index]; + // print("profileImage: " + branchDetailModel.branchProfileImage.toString()); + // branchDetailModel.branchProfileImage ??= "https://www.businesslinkuae.com/wp-content/uploads/2024/03/forigion-company.jpg"; + // print("profileImage: " + branchDetailModel.branchProfileImage.toString()); return SizedBox( width: 90, child: Column( children: [ - branchDetailModel.branchProfileImage - .buildNetworkImage( - height: 80, - width: 80, - ) - .toCircle(borderRadius: 100), - 8.height, + branchDetailModel.branchProfileImage.buildNetworkImage(height: 73, width: 73, fit: BoxFit.cover).toCircle(borderRadius: 100), + + // Image.network( + // branchDetailModel.branchProfileImage == null || branchDetailModel.branchProfileImage!.isEmpty ? "" : branchDetailModel.branchProfileImage!, + // errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) { + // return const SizedBox( + // width: 73, + // height: 73, + // child: Icon(Icons.error_outline), + // ); + // }, + // width: 73, + // height: 73, + // fit: BoxFit.cover, + // ).toCircle(borderRadius: 100), + 9.height, Flexible( - child: branchDetailModel.branchName!.toText( - fontSize: 14, - isBold: true, - textAlign: TextAlign.center, - ), + child: branchDetailModel.branchName!.toText(fontSize: 14, textAlign: TextAlign.center, letterSpacing: -0.84, height: 18 / 14), ), ], ), diff --git a/lib/views/settings/branch/branch_list_page.dart b/lib/views/settings/branch/branch_list_page.dart index 656a793..f9e34eb 100644 --- a/lib/views/settings/branch/branch_list_page.dart +++ b/lib/views/settings/branch/branch_list_page.dart @@ -70,10 +70,11 @@ class BranchListPage extends StatelessWidget { ? Center(child: LocaleKeys.no_branch.tr().toText(fontSize: 16, color: MyColors.lightTextColor)) : ListView.separated( itemBuilder: (context, index) { + BranchDetailModel branchModel = branches[index]; return Row( children: [ - branchModel.branchProfileImage.buildNetworkImage(width: 74, height: 50), + branchModel.branchProfileImage.buildNetworkImage(width: 74, height: 50, fit: BoxFit.cover), 12.width, Expanded( child: Column(