requestItem method
Implementation
Widget requestItem(
BuildContext context,
{int index = 0,
String from = '',
String to = '',
String date = '',
String status = 'Confirmed',
String id = '',
String passengers = ''}) {
return Column(
children: [
ResponsiveGridRow(children: [
ResponsiveGridCol(
lg: context.x < 1100 ? 9 : 7,
md: 6,
sm: 8,
xs: 12,
child: Row(
children: [
Text(from,
style: TextStyle(
fontSize: 15.dp,
fontWeight: FontWeight.w500,
color: ColorHelper.black01)),
5.SpaceY,
Image.asset('assets/home/right_arrow.png', width: 20),
5.SpaceY,
Text(to,
style: TextStyle(
fontSize: 15.dp,
fontWeight: FontWeight.w500,
color: ColorHelper.black01)),
],
),
),
ResponsiveGridCol(
lg: context.x < 1100 ? 7 : 5,
md: 6,
sm: 8,
xs: 12,
child: Row(
mainAxisAlignment: context.x < 1100
? MainAxisAlignment.start
: MainAxisAlignment.end,
children: [
Container(
decoration: BoxDecoration(
color: ColorHelper.green00,
borderRadius: BorderRadius.circular(20)),
padding:
const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
child: Text('• $status',
style: TextStyle(
fontSize: 12.dp,
fontWeight: FontWeight.w500,
color: ColorHelper.green02))),
10.SpaceY,
DropdownButton(
isDense: true,
underline: Container(),
icon: const Icon(
Icons.arrow_drop_down_outlined,
color: ColorHelper.grey05,
),
items: [
DropdownMenuItem(
alignment: Alignment.center,
child: Text(
'View Details',
style: TextStyle(
fontSize: 13.dp,
fontWeight: FontWeight.w500,
color: ColorHelper.primaryBlue,
),
),
),
],
onChanged: (value) {},
),
],
),
)
]),
15.SpaceX,
Row(
children: [
Container(
decoration: BoxDecoration(
color: ColorHelper.grey00,
borderRadius: BorderRadius.circular(20)),
padding:
const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
child: Text('ID $id',
style: TextStyle(
fontSize: 11.dp,
fontWeight: FontWeight.w400,
color: ColorHelper.black01))),
10.SpaceY,
Image.asset('assets/home/passenger.png',
width: 16, color: Colors.black),
3.SpaceY,
Text(passengers,
style: TextStyle(
fontSize: 11.dp,
fontWeight: FontWeight.w400,
color: ColorHelper.grey05)),
20.SpaceY,
Text('Requested on $date',
style: TextStyle(
fontSize: 11.dp,
fontWeight: FontWeight.w400,
color: ColorHelper.grey05))
],
),
15.SpaceX,
const Divider(
thickness: 0.5,
color: ColorHelper.headerDividerColor,
),
],
);
}