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.
128 lines
4.0 KiB
Dart
128 lines
4.0 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:mc_common_app/classes/consts.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/button/show_fill_button.dart';
|
|
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
|
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
|
|
|
import '../../config/provider_routes.dart';
|
|
import '../dashboard/widget/request_list_card_widget.dart';
|
|
|
|
class RequestDetailPage extends StatelessWidget {
|
|
const RequestDetailPage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: const CustomAppBar(
|
|
title: "Request Detail",
|
|
),
|
|
body: SizedBox(
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Column(
|
|
children: [
|
|
Image.asset(MyAssets.bnCar),
|
|
24.height,
|
|
buildRequestContainer(context),
|
|
],
|
|
).toWhiteContainer(
|
|
width: double.infinity,
|
|
allPading: 12,
|
|
margin: const EdgeInsets.only(
|
|
top: 21,
|
|
right: 21,
|
|
left: 21,
|
|
),
|
|
),
|
|
ShowFillButton(
|
|
title: "Send Offer",
|
|
maxWidth: double.infinity,
|
|
margin: const EdgeInsets.all(21),
|
|
onPressed: () {
|
|
navigateWithName(context, ProviderAppRoutes.sendOfferPage);
|
|
},
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
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)
|
|
],
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
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)),
|
|
],
|
|
);
|
|
}
|
|
}
|