chat moDULE ANd other testing before demo
parent
b00b93a7ab
commit
37ec048a2c
@ -1,104 +0,0 @@
|
|||||||
import 'package:car_provider_app/config/provider_routes.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mc_common_app/classes/consts.dart';
|
|
||||||
import 'package:mc_common_app/config/routes.dart';
|
|
||||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
|
||||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
|
||||||
import 'package:mc_common_app/theme/colors.dart';
|
|
||||||
import 'package:mc_common_app/utils/navigator.dart';
|
|
||||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
|
||||||
|
|
||||||
class RequestListCardWidget extends StatelessWidget {
|
|
||||||
final int count;
|
|
||||||
|
|
||||||
const RequestListCardWidget({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: buildRequestContainer(context),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget buildRequestContainer(BuildContext context) {
|
|
||||||
return 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),
|
|
||||||
showItem("Model:", "2019"),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
"Riyadh".toText(
|
|
||||||
color: MyColors.lightTextColor,
|
|
||||||
),
|
|
||||||
"9 Hours Ago".toText(color: MyColors.lightTextColor),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
showItem("Customer Name", "Abdullah"),
|
|
||||||
showItem("Description", "Looking for the car as soon as possible"),
|
|
||||||
showItem("Price Range:", ""),
|
|
||||||
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,
|
|
||||||
onTap: () {
|
|
||||||
navigateWithName(context, AppRoutes.requestsDetailPage);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget showItem(String title, String value) {
|
|
||||||
return Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
if (title.isNotEmpty)
|
|
||||||
title.toText(
|
|
||||||
color: MyColors.lightTextColor,
|
|
||||||
),
|
|
||||||
if (title.isNotEmpty) 2.width,
|
|
||||||
if (value.isNotEmpty) Expanded(child: value.toText(isBold: true)),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue