pushing again with main activity

aamir_dev
Faiz Hashmi 1 year ago
parent b38a5e4b69
commit 3ccb9d4955

@ -0,0 +1,7 @@
package com.cloud.solutions.mowater.ksa.provider
import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() {
}

@ -1,7 +1,6 @@
import 'dart:async';
import 'package:car_provider_app/config/provider_routes.dart';
import 'package:car_provider_app/views/settings/branch/dealer/widget/assign_dealer_user_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:mc_common_app/generated/locale_keys.g.dart';
import 'package:mc_common_app/view_models/service_view_model.dart';
import 'package:car_provider_app/views/settings/services/services_list_page.dart';
@ -96,21 +95,31 @@ class BranchDetailPage extends StatelessWidget {
actionWidget = Column(
children: [
Row(
children: [
('${LocaleKeys.rejectionComments.tr()}:').toText(fontSize: 16, color: MyColors.darkTextColor),
],
children: [('${LocaleKeys.rejectionComments.tr()}:').toText(fontSize: 16, color: MyColors.darkTextColor, textAlign: TextAlign.right)],
),
Row(
children: [
if (branchData.branchAuditTrial != null && branchData.branchAuditTrial!.isNotEmpty) ...[
Flexible(
child: ('These are some dummy static comments from the Admin. Which will guide you regarding the next steps to resubmit.').toText(
child: ("${branchData.branchAuditTrial!.first.comment}").toText(
fontSize: 14,
color: MyColors.primaryColor,
isItalic: true,
),
),
]
],
),
12.height,
ShowFillButton(
title: LocaleKeys.rejectedFormAdmin.tr(),
maxWidth: double.infinity,
backgroundColor: MyColors.darkWhiteColor,
borderColor: MyColors.darkPrimaryColor,
txtColor: MyColors.lightTextColor,
isFilled: true,
onPressed: () {},
),
],
);
}
@ -120,7 +129,7 @@ class BranchDetailPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
filterBranch();
getBranchUsers(context);
// getBranchUsers(context);
return Scaffold(
appBar: CustomAppBar(title: LocaleKeys.branchDetail.tr()),
body: Consumer<ServiceVM>(builder: (context, model, _) {
@ -140,8 +149,11 @@ class BranchDetailPage extends StatelessWidget {
Expanded(
child: Row(
children: [
branchData.branchProfileImage.buildNetworkImage(),
12.width,
branchData.branchProfileImage.buildNetworkImage(
height: 55,
width: 50,
),
10.width,
LocaleKeys.branchInfo.tr().toText(fontSize: 16, color: Colors.black, isBold: true),
],
),
@ -162,9 +174,11 @@ class BranchDetailPage extends StatelessWidget {
showData("${LocaleKeys.city.tr()}:", branchData.cityName.toString()),
showData("${LocaleKeys.branchName.tr()}:", branchData.branchName.toString()),
showData("${LocaleKeys.branchDescription.tr()}:", branchData.branchDescription.toString()),
showData("${LocaleKeys.branchDescription.tr()}:", branchData.branchDescription.toString()),
showData("${LocaleKeys.time.tr()}:", "${branchData.openTime.toString()} - ${branchData.closeTime.toString()}"),
showData("${LocaleKeys.address.tr()}:", branchData.address.toString()),
],
),
).paddingOnly(left: 60),
],
).horPaddingMain(),
10.height,
@ -281,10 +295,7 @@ class BranchDetailPage extends StatelessWidget {
child: ListView.builder(
itemBuilder: (context, index) {
return Container(
child: (EasyLocalization
.of(context)
?.currentLocale
?.countryCode == "SA"
child: (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA"
? categories[pIndex].services![index].serviceDescriptionN.toString()
: categories[pIndex].services![index].serviceDescription.toString())
.toText(
@ -348,9 +359,7 @@ class BranchDetailPage extends StatelessWidget {
bool validation(BuildContext context) {
bool isValid = false;
for (var element in context
.read<ServiceVM>()
.allProviderDealersList) {
for (var element in context.read<ServiceVM>().allProviderDealersList) {
if (element.isBranchUser ?? false) {
isValid = true;
}

@ -45,9 +45,7 @@ class _CreateBranchViewState extends State<CreateBranchView> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: LocaleKeys.createBranch.tr(),
),
appBar: CustomAppBar(title: LocaleKeys.defineBranches.tr()),
body: Consumer<ServiceVM>(builder: (context, serviceVM, _) {
return SizedBox(
width: double.infinity,
@ -56,12 +54,9 @@ class _CreateBranchViewState extends State<CreateBranchView> {
children: [
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
children: [
// LocaleKeys.chooseCountry.tr().toText(fontSize: 14, color: MyColors.lightTextColor),
// 8.height,
12.height,
serviceVM.country != null
? DropdownField(
(DropValue value) {
@ -193,15 +188,14 @@ class _CreateBranchViewState extends State<CreateBranchView> {
],
),
],
),
),
).horPaddingMain(),
),
),
if (widget.branchData == null || widget.branchData!.id == null) ...[
SizedBox(
width: double.infinity,
child: Padding(
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20),
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 10),
child: ShowFillButton(
maxHeight: 55,
title: LocaleKeys.createBranch.tr(),
@ -222,25 +216,24 @@ class _CreateBranchViewState extends State<CreateBranchView> {
] else ...[
SizedBox(
width: double.infinity,
child: Padding(
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20),
child: ShowFillButton(
maxHeight: 55,
title: widget.branchData != null ? (widget.branchData!.id == null ? LocaleKeys.createBranch.tr() : LocaleKeys.updateBranch.tr()) : LocaleKeys.createBranch.tr(),
title: LocaleKeys.updateBranch.tr(),
onPressed: () async {
await serviceVM.updateBranch(
widget.branchData!.id ?? 0,
serviceVM.branchName,
serviceVM.branchDescription,
serviceVM.cityId.toString(),
serviceVM.address,
serviceVM.latitude.toString(),
serviceVM.longitude.toString(),
await serviceVM.onUpdateBranchPressed(
context: context,
branchID: widget.branchData!.id ?? 0,
branchName: widget.branchData!.branchName ?? "",
branchDesc: widget.branchData!.branchDescription ?? "",
cityID: widget.branchData!.cityId ?? 0,
address: widget.branchData!.address ?? "",
latitude: widget.branchData!.latitude ?? "0",
longitude: widget.branchData!.longitude ?? "0",
);
},
).horPaddingMain(),
),
),
),
12.height,
],
],
),

Loading…
Cancel
Save