Merge branch 'aamir_dev' into faiz_development

aamir_dev
Faiz Hashmi 2 years ago
commit 0e82b04e89

@ -19,6 +19,7 @@
<application <application
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:extractNativeLibs="true"
android:label="Provider"> android:label="Provider">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"

@ -152,12 +152,13 @@ class MyApp extends StatelessWidget {
return Sizer( return Sizer(
builder: (context, orientation, deviceType) { builder: (context, orientation, deviceType) {
injector.get<AppState>().setAppType(AppType.provider); injector.get<AppState>().setAppType(AppType.provider);
AppState().setPostParamsModel( AppState().setPostParamsModel(
PostParamsModel( PostParamsModel(
languageID: EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2, 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( return MaterialApp(
theme: AppTheme.getTheme(isArabic: EasyLocalization.of(context)?.locale.languageCode == "ar"), theme: AppTheme.getTheme(isArabic: EasyLocalization.of(context)?.locale.languageCode == "ar"),
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,

@ -56,30 +56,35 @@ class HomeFragment extends StatelessWidget {
child: RefreshIndicator( child: RefreshIndicator(
onRefresh: () async => await context.read<DashboardVM>().onRefresh(context), onRefresh: () async => await context.read<DashboardVM>().onRefresh(context),
child: ListView( child: ListView(
padding: EdgeInsets.zero,
children: [ children: [
10.height, Column(
ViewAllWidget( children: [
title: LocaleKeys.upcoming_appointment.tr(), 10.height,
subTitle: LocaleKeys.view_all.tr(), ViewAllWidget(
onSubtitleTapped: () { title: LocaleKeys.upcoming_appointment.tr(),
context.read<DashboardVM>().onNavbarTapped(1); subTitle: LocaleKeys.view_all.tr(),
}).horPaddingMain(), onSubtitleTapped: () {
// const AppointmentSliderWidget().horPaddingMain(), context.read<DashboardVM>().onNavbarTapped(1);
CommonAppointmentSliderWidget( }).horPaddingMain(),
onAppointmentClick: (AppointmentListModel value) { // const AppointmentSliderWidget().horPaddingMain(),
navigateWithName(context, ProviderAppRoutes.appointmentDetailList, arguments: value); CommonAppointmentSliderWidget(
}, onAppointmentClick: (AppointmentListModel value) {
), navigateWithName(context, ProviderAppRoutes.appointmentDetailList, arguments: value);
21.height, },
ViewAllWidget( ).horPaddingMain(),
title: LocaleKeys.myBranches.tr(), //margin: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
subTitle: LocaleKeys.view_all.tr(), 24.height,
onSubtitleTapped: () { ViewAllWidget(
context.read<DashboardVM>().onNavbarTapped(0); title: LocaleKeys.myBranches.tr(),
}, subTitle: LocaleKeys.view_all.tr(),
).horPaddingMain(), onSubtitleTapped: () {
const ServiceProviderWidget().horPaddingMain(), context.read<DashboardVM>().onNavbarTapped(0);
},
).horPaddingMain(),
const ServiceProviderWidget().horPaddingMain(),
],
).toWhiteContainer(width: double.infinity),
Consumer( Consumer(
builder: (BuildContext context, AdVM adVM, Widget? child) { builder: (BuildContext context, AdVM adVM, Widget? child) {
if (adVM.state == ViewState.busy) { 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, 21.height,
], ],
), ),

@ -37,23 +37,31 @@ class ServiceProviderWidget extends StatelessWidget {
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
BranchDetailModel branchDetailModel = model.branches!.data!.serviceProviderBranch![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( return SizedBox(
width: 90, width: 90,
child: Column( child: Column(
children: [ children: [
branchDetailModel.branchProfileImage branchDetailModel.branchProfileImage.buildNetworkImage(height: 73, width: 73, fit: BoxFit.cover).toCircle(borderRadius: 100),
.buildNetworkImage(
height: 80, // Image.network(
width: 80, // branchDetailModel.branchProfileImage == null || branchDetailModel.branchProfileImage!.isEmpty ? "" : branchDetailModel.branchProfileImage!,
) // errorBuilder: (BuildContext context, Object exception, StackTrace? stackTrace) {
.toCircle(borderRadius: 100), // return const SizedBox(
8.height, // width: 73,
// height: 73,
// child: Icon(Icons.error_outline),
// );
// },
// width: 73,
// height: 73,
// fit: BoxFit.cover,
// ).toCircle(borderRadius: 100),
9.height,
Flexible( Flexible(
child: branchDetailModel.branchName!.toText( child: branchDetailModel.branchName!.toText(fontSize: 14, textAlign: TextAlign.center, letterSpacing: -0.84, height: 18 / 14),
fontSize: 14,
isBold: true,
textAlign: TextAlign.center,
),
), ),
], ],
), ),

@ -70,10 +70,11 @@ class BranchListPage extends StatelessWidget {
? Center(child: LocaleKeys.no_branch.tr().toText(fontSize: 16, color: MyColors.lightTextColor)) ? Center(child: LocaleKeys.no_branch.tr().toText(fontSize: 16, color: MyColors.lightTextColor))
: ListView.separated( : ListView.separated(
itemBuilder: (context, index) { itemBuilder: (context, index) {
BranchDetailModel branchModel = branches[index]; BranchDetailModel branchModel = branches[index];
return Row( return Row(
children: [ children: [
branchModel.branchProfileImage.buildNetworkImage(width: 74, height: 50), branchModel.branchProfileImage.buildNetworkImage(width: 74, height: 50, fit: BoxFit.cover),
12.width, 12.width,
Expanded( Expanded(
child: Column( child: Column(

Loading…
Cancel
Save