You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
car_customer_app/lib/views/dashboard/fragments/home_fragment.dart

42 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
import 'package:mc_common_app/widgets/common_widgets/ad_widget.dart';
import 'package:mc_common_app/widgets/common_widgets/view_all_widget.dart';
import 'package:mc_common_app/widgets/common_widgets/my_service_provider.dart';
import 'package:mc_common_app/widgets/common_widgets/customer_appointment_slider_widget.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),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
ViewAllWidget(title: "Upcoming Appointment".toUpperCase(), subTitle: "View All").horPaddingMain(),
const CustomerAppointmentSliderWidget(),
7.height,
ViewAllWidget(title: "My Recent Service Providers".toUpperCase(), subTitle: "View All").horPaddingMain(),
const ServiceProviderWidget().horPaddingMain(),
15.height,
ViewAllWidget(title: "My Active Ads".toUpperCase(), subTitle: "View All").horPaddingMain(),
// todo: we will replace this count with the sublist of ads
const AdWidget(count: 1).horPaddingMain(),
20.height,
ViewAllWidget(title: "My Recommended Ads".toUpperCase(), subTitle: "View All").horPaddingMain(),
const AdWidget(count: 2).horPaddingMain(),
],
),
),
),
);
}
}