Design Progress 3-20
parent
c3f4c66342
commit
43fcd3bfdb
@ -0,0 +1,7 @@
|
||||
import 'package:mc_common_app/config/dependencies.dart';
|
||||
|
||||
class LocalDependencies {
|
||||
static void addDependencies() {
|
||||
AppDependencies.addDependencies();
|
||||
}
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'colors.dart';
|
||||
|
||||
class AppTheme {
|
||||
static getTheme(isArabic) => ThemeData(
|
||||
// This is the theme of your application.
|
||||
//
|
||||
// Try running your application with "flutter run". You'll see the
|
||||
// application has a blue toolbar. Then, without quitting the app, try
|
||||
// changing the primarySwatch below to Colors.green and then invoke
|
||||
// "hot reload" (press "r" in the console where you ran "flutter run",
|
||||
// or simply save your changes to "hot reload" in a Flutter IDE).
|
||||
// Notice that the counter didn't reset back to zero; the application
|
||||
// is not restarted.
|
||||
primaryColor: primaryColor,
|
||||
primaryTextTheme: const TextTheme(
|
||||
titleLarge: TextStyle(color: Colors.white),
|
||||
), colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.orange).copyWith(background: Colors.white),
|
||||
);
|
||||
}
|
||||
|
||||
extension ExtendedRevoCheckTheme on TextTheme {
|
||||
//add custom styles and colors here
|
||||
//taken from https://medium.com/@crizantlai/flutter-how-to-extend-themedata-b5b987a95bb5
|
||||
TextStyle get price => const TextStyle(color: Colors.redAccent);
|
||||
}
|
||||
@ -1,73 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MyColors {
|
||||
static const Color darkPrimaryColor = Color(0xffF47F20);
|
||||
static const Color primaryColor = Color(0xffF69521);
|
||||
static const Color accentColor = Colors.blue;
|
||||
static const Color lightTextColor = Color(0xff969696);
|
||||
static const Color textColor = Color(0xff777777);
|
||||
static const Color textFieldColor = Color(0xffF3F5F7);
|
||||
static const Color darkIconColor = Color(0xff28323A);
|
||||
static const Color darkTextColor = Color(0xff2B353E);
|
||||
static const Color normalTextColor = Color(0xff5A5A5A);
|
||||
static const Color gradiantStartColor = Color(0xff33c0a5);
|
||||
static const Color gradiantEndColor = Color(0xff259db7);
|
||||
static const Color textMixColor = Color(0xff2BB8A6);
|
||||
static const Color backgroundColor = Color(0xffF8F8F8);
|
||||
static const Color grey57Color = Color(0xff575757);
|
||||
static const Color grey77Color = Color(0xff777777);
|
||||
static const Color grey70Color = Color(0xff707070);
|
||||
static const Color greyACColor = Color(0xffACACAC);
|
||||
static const Color grey98Color = Color(0xff989898);
|
||||
static const Color lightGreyEFColor = Color(0xffEFEFEF);
|
||||
static const Color lightGreyEDColor = Color(0xffEDEDED);
|
||||
static const Color lightGreyEAColor = Color(0xffEAEAEA);
|
||||
static const Color darkWhiteColor = Color(0xffE0E0E0);
|
||||
static const Color redColor = Color(0xffD02127);
|
||||
static const Color yellowColor = Color(0xffF4E31C);
|
||||
static const Color backgroundBlackColor = Color(0xff202529);
|
||||
static const Color black = Color(0xff000000);
|
||||
static const Color white = Color(0xffffffff);
|
||||
static const Color green = Color(0xffffffff);
|
||||
static const Color borderColor = Color(0xffE8E8E8);
|
||||
|
||||
static Decoration gradient = BoxDecoration(
|
||||
gradient: const LinearGradient(colors: [
|
||||
darkPrimaryColor,
|
||||
primaryColor,
|
||||
]),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: primaryColor.withOpacity(0.5),
|
||||
blurRadius: 20.0,
|
||||
spreadRadius: 1.0,
|
||||
)
|
||||
],
|
||||
);
|
||||
|
||||
static Decoration gradientButton = BoxDecoration(
|
||||
gradient: const LinearGradient(colors: [
|
||||
darkPrimaryColor,
|
||||
primaryColor,
|
||||
]),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: primaryColor.withOpacity(0.2),
|
||||
blurRadius: 4.0,
|
||||
spreadRadius: 0.5,
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
const Color primaryColor = Colors.white;
|
||||
const Color accentColor = Colors.blue;
|
||||
const Color appBackgroundColor = Colors.white;
|
||||
Color? accentColorDark = Colors.green[800];
|
||||
const Color borderColor = Colors.blueGrey;
|
||||
Color? borderLightColor = Colors.blueGrey[50];
|
||||
const Color iconColor = Colors.blueGrey;
|
||||
Color? headingColor = Colors.blueGrey[800];
|
||||
Color? txtColor = Colors.blueGrey[500];
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
import 'package:car_customer_app/extensions/int_extensions.dart';
|
||||
import 'package:car_customer_app/views/dashboard/widgets/ad_widget.dart';
|
||||
import 'package:car_customer_app/views/dashboard/widgets/appointment_slider_widget.dart';
|
||||
import 'package:car_customer_app/views/dashboard/widgets/my_branches_widget.dart';
|
||||
import 'package:car_customer_app/views/dashboard/widgets/view_all_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HomeFragment extends StatelessWidget {
|
||||
const HomeFragment({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 8, left: 21, right: 21, bottom: 21),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
ViewAllWidget(title: "Upcoming Appointment".toUpperCase(), subTitle: "View All"),
|
||||
const AppointmentSliderWidget(),
|
||||
20.height,
|
||||
ViewAllWidget(title: "My Recent Service Providers".toUpperCase(), subTitle: "View All"),
|
||||
const ServiceProviderWidget(),
|
||||
20.height,
|
||||
ViewAllWidget(title: "My Active Ads".toUpperCase(), subTitle: "View All"),
|
||||
// todo: we will replace this count with the sublist of ads
|
||||
const AdWidget(count: 1),
|
||||
20.height,
|
||||
ViewAllWidget(title: "My Recommended Ads".toUpperCase(), subTitle: "View All"),
|
||||
const AdWidget(count: 2),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,110 @@
|
||||
import 'package:car_customer_app/extensions/int_extensions.dart';
|
||||
import 'package:car_customer_app/extensions/string_extensions.dart';
|
||||
import 'package:car_customer_app/theme/colors.dart';
|
||||
import 'package:car_customer_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AdWidget extends StatelessWidget {
|
||||
final int count;
|
||||
|
||||
const AdWidget({Key? key, required this.count}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView.builder(
|
||||
itemCount: count,
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15),
|
||||
child: buildAdContainer(),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget buildAdContainer() {
|
||||
return Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
"assets/images/bn_car.jpeg",
|
||||
width: 80,
|
||||
height: 80,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
12.width,
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
"Toyota Crolla".toText(fontSize: 16, isBold: true),
|
||||
Row(
|
||||
children: [
|
||||
"Model:".toText(
|
||||
color: MyColors.lightTextColor,
|
||||
),
|
||||
2.width,
|
||||
"2019".toText(),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
"Mileage:".toText(
|
||||
color: MyColors.lightTextColor,
|
||||
),
|
||||
2.width,
|
||||
"73,000 km".toText(),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
"Riyadh".toText(
|
||||
color: MyColors.lightTextColor,
|
||||
),
|
||||
"9 Hours Ago".toText(
|
||||
color: MyColors.lightTextColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
8.height,
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
"30,000".toText(fontSize: 16, isBold: true),
|
||||
2.width,
|
||||
"SAR:".toText(
|
||||
color: MyColors.lightTextColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Icon(Icons.arrow_forward)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
).toWhiteContainer(width: double.infinity, allPading: 12);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
import 'package:car_customer_app/extensions/int_extensions.dart';
|
||||
import 'package:car_customer_app/extensions/string_extensions.dart';
|
||||
import 'package:car_customer_app/theme/colors.dart';
|
||||
import 'package:car_customer_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AppointmentSliderWidget extends StatelessWidget {
|
||||
const AppointmentSliderWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
"Olaya Brach".toText(
|
||||
color: MyColors.lightTextColor,
|
||||
isBold: true,
|
||||
),
|
||||
"Abdullah Alhbas".toText(
|
||||
isBold: true,
|
||||
fontSize: 14,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
"Appt. On:".toText(
|
||||
color: MyColors.lightTextColor,
|
||||
),
|
||||
2.width,
|
||||
"19-Mar-2023 11:48 AM".toText(),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
"1+ Requests".toText(fontSize: 10).toContainer(
|
||||
borderRadius: 15,
|
||||
backgroundColor: MyColors.lightGreyEAColor,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6,
|
||||
horizontal: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
8.height,
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
showServices("Maintenance"),
|
||||
2.height,
|
||||
showServices("Accessories and Modification"),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Icon(
|
||||
Icons.arrow_forward,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
).toWhiteContainer(width: double.infinity, allPading: 0);
|
||||
}
|
||||
|
||||
Widget showServices(String title) {
|
||||
return Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.ac_unit,
|
||||
color: MyColors.primaryColor,
|
||||
size: 18,
|
||||
),
|
||||
8.width,
|
||||
title.toText(
|
||||
fontSize: 14,
|
||||
isBold: true,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
import 'package:car_customer_app/classes/consts.dart';
|
||||
import 'package:car_customer_app/generated/locale_keys.g.dart';
|
||||
import 'package:car_customer_app/theme/colors.dart';
|
||||
import 'package:car_customer_app/view_models/dashboard_view_model.dart';
|
||||
import 'package:car_customer_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
class CustomBottomNavbar extends StatelessWidget {
|
||||
const CustomBottomNavbar({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final DashboardVM dashboardVM = context.watch<DashboardVM>();
|
||||
return BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(MyAssets.providersIcon).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.providersIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.providers.tr(),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(MyAssets.appointmentsIcon).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.appointmentsIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.appointments.tr(),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(
|
||||
MyAssets.homeIcon,
|
||||
color: MyColors.lightIconColor,
|
||||
).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.homeIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.home.tr(),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(MyAssets.announcementIcon).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.announcementIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.ads.tr(),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: SvgPicture.asset(MyAssets.settingsIcon).paddingAll(5),
|
||||
activeIcon: SvgPicture.asset(MyAssets.settingsIcon, color: MyColors.darkIconColor).paddingAll(5),
|
||||
label: LocaleKeys.settings.tr(),
|
||||
),
|
||||
],
|
||||
currentIndex: dashboardVM.selectedNavbarBarIndex,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
selectedItemColor: MyColors.darkIconColor,
|
||||
showSelectedLabels: true,
|
||||
showUnselectedLabels: true,
|
||||
unselectedItemColor: MyColors.lightTextColor,
|
||||
unselectedFontSize: 11,
|
||||
selectedFontSize: 11,
|
||||
selectedLabelStyle: const TextStyle(fontFamily: "Poppins"),
|
||||
unselectedLabelStyle: const TextStyle(fontFamily: "Poppins"),
|
||||
onTap: (index) => dashboardVM.onNavbarTapped(index),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,196 @@
|
||||
import 'package:car_customer_app/classes/app_state.dart';
|
||||
import 'package:car_customer_app/classes/consts.dart';
|
||||
import 'package:car_customer_app/config/routes.dart';
|
||||
import 'package:car_customer_app/extensions/int_extensions.dart';
|
||||
import 'package:car_customer_app/extensions/string_extensions.dart';
|
||||
import 'package:car_customer_app/extensions/widget_extensions.dart';
|
||||
import 'package:car_customer_app/generated/locale_keys.g.dart';
|
||||
import 'package:car_customer_app/models/user/image_response.dart';
|
||||
import 'package:car_customer_app/theme/colors.dart';
|
||||
import 'package:car_customer_app/utils/navigator.dart';
|
||||
import 'package:car_customer_app/utils/utils.dart';
|
||||
import 'package:car_customer_app/view_models/dashboard_view_model.dart';
|
||||
import 'package:car_customer_app/widgets/show_fill_button.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
|
||||
|
||||
|
||||
class CustomDrawer extends StatefulWidget {
|
||||
final DashboardVM dashboardVM;
|
||||
const CustomDrawer({Key? key, required this.dashboardVM}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CustomDrawer> createState() => _CustomDrawerState();
|
||||
}
|
||||
|
||||
class _CustomDrawerState extends State<CustomDrawer> {
|
||||
|
||||
void _openImagePicker() {
|
||||
showDialog<ImageSource>(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
content: const Text("Choose image source"),
|
||||
actions: [
|
||||
TextButton(child: const Text("Camera"), onPressed: () => widget.dashboardVM.pickImageFromPhone(context, 0)),
|
||||
TextButton(child: const Text("Gallery"), onPressed: () => widget.dashboardVM.pickImageFromPhone(context, 1)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Drawer(
|
||||
child: Column(
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 200,
|
||||
color: MyColors.darkPrimaryColor.withOpacity(0.01),
|
||||
child: Image.network(
|
||||
ApiConsts.baseUrlServices + AppState().getUser.data!.userInfo!.userImageUrl.toString(),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 10,
|
||||
right: 10,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[200],
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.edit,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
).onPress(() {
|
||||
_openImagePicker();
|
||||
// _handleURLButtonPress(context, ImageSourceType.camera);
|
||||
}),
|
||||
),
|
||||
12.height,
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[200],
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.delete,
|
||||
color: Colors.red,
|
||||
).onPress(() async {
|
||||
Utils.showLoading(context);
|
||||
ImageResponse response = await widget.dashboardVM.updateUserImage("");
|
||||
if (response.messageStatus == 1) {
|
||||
Utils.showToast("Image is Deleted");
|
||||
setState(() {
|
||||
AppState().getUser.data!.userInfo!.userImageUrl = response.data;
|
||||
});
|
||||
}
|
||||
Utils.hideLoading(context);
|
||||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
color: MyColors.darkPrimaryColor.withOpacity(0.1),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"userName".toText(
|
||||
isBold: true,
|
||||
fontSize: 20,
|
||||
letterSpacing: -1.44,
|
||||
),
|
||||
AppState().getUser.data!.userInfo!.roleName!.toText(fontSize: 10),
|
||||
],
|
||||
),
|
||||
),
|
||||
ShowFillButton(
|
||||
title: LocaleKeys.edit.tr(),
|
||||
fontSize: 12,
|
||||
maxHeight: 35,
|
||||
maxWidth: 70,
|
||||
onPressed: () {
|
||||
navigateWithName(context, AppRoutes.editAccountPage);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.notifications,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.notifications.tr().toText(fontSize: 12),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.settings,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.general.tr().toText(fontSize: 12),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.person,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.account.tr().toText(fontSize: 12),
|
||||
),
|
||||
ListTile(
|
||||
leading: Image.asset(
|
||||
"assets/images/ic_world.png",
|
||||
width: 20,
|
||||
height: 20,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.english.tr().toText(fontSize: 12),
|
||||
onTap: () {
|
||||
if (EasyLocalization.of(context)?.currentLocale?.countryCode == "SA") {
|
||||
context.setLocale(const Locale("en", "US"));
|
||||
} else {
|
||||
context.setLocale(const Locale('ar', 'SA'));
|
||||
}
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.logout,
|
||||
color: MyColors.darkPrimaryColor,
|
||||
),
|
||||
title: LocaleKeys.signOut.tr().toText(fontSize: 12),
|
||||
onTap: () {
|
||||
pop(context);
|
||||
navigateReplaceWithName(context, AppRoutes.registerSelection);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
import 'package:car_customer_app/extensions/int_extensions.dart';
|
||||
import 'package:car_customer_app/extensions/string_extensions.dart';
|
||||
import 'package:car_customer_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ServiceProviderWidget extends StatelessWidget {
|
||||
const ServiceProviderWidget({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
height: 150,
|
||||
child: ListView.builder(
|
||||
itemCount: 9,
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return SizedBox(
|
||||
width: 90,
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
"assets/images/bn_car.jpeg",
|
||||
width: 80,
|
||||
height: 80,
|
||||
fit: BoxFit.cover,
|
||||
).toCircle(borderRadius: 100),
|
||||
8.height,
|
||||
"Olaya Branch".toText(fontSize: 14, isBold: true, textAlign: TextAlign.center),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
import 'package:car_customer_app/extensions/string_extensions.dart';
|
||||
import 'package:car_customer_app/theme/colors.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class ViewAllWidget extends StatelessWidget {
|
||||
final String title;
|
||||
final String subTitle;
|
||||
|
||||
const ViewAllWidget({Key? key, required this.title, required this.subTitle}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(child: title.toText(isBold: true, fontSize: 18)),
|
||||
subTitle.toText(
|
||||
fontSize: 11,
|
||||
isBold: true,
|
||||
color: MyColors.primaryColor,
|
||||
textDecoration: TextDecoration.underline,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue