Create Taxi Booking - FareBreakDown.dart
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:myfirstproject/orderconfirm.dart';
import 'package:myfirstproject/payment.dart';
import 'common/constants.dart';
class FareBreakdown extends StatelessWidget
{
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(20.0),
child: Container(child:
Column(children: [
Row(
children: [
IconButton(
onPressed: () { Navigator.pop(context); },
icon: Icon(FontAwesomeIcons.arrowLeftLong),
color: Navy,
),
Expanded(child: Align(alignment: Alignment.center, child: Text("Fare Breakdown", style: TextStyle(color: Navy, fontWeight: FontWeight.bold, fontSize: 15) )))
],
),
SizedBox(height: 20,),
Container( decoration: BoxDecoration(border: Border.all(color: Color(0XffF0F4F7)), color: SecondaryColor, borderRadius: BorderRadius.circular(10.0)),
child: Padding( padding: const EdgeInsets.all(10.0),
child: Column( mainAxisAlignment: MainAxisAlignment.start,crossAxisAlignment: CrossAxisAlignment.start,
children: [Material(child: Container(child: TextField(readOnly: true, decoration: InputDecoration(hintText: 'Pick up', labelText: 'Mall living world, Exit Gate',filled: true, fillColor: SecondaryColor),))),
Material(child: Container(child: TextField(readOnly: true, decoration: InputDecoration(hintText: 'Drop off', labelText: 'Pasar Bush, Meat Spot',filled: true, fillColor: SecondaryColor),))),
SizedBox(height: 10),
Container(decoration: BoxDecoration(borderRadius: BorderRadius.circular(5), border: Border.all(color: Colors.green),),
child: Padding(
padding: const EdgeInsets.only(top:8, bottom: 8, left: 20, right: 20 ),
child: Text('Edit', style: TextStyle(color: Colors.green),),
),
)
],
),
)
,
),
SizedBox(height: 20,),
Container( decoration: BoxDecoration(border: Border.all(color: Color(0XffF0F4F7)), color: SecondaryColor, borderRadius: BorderRadius.circular(10.0)),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(mainAxisAlignment: MainAxisAlignment.start,crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row( children: [
CircleAvatar( backgroundImage: CachedNetworkImageProvider( 'https://www.creativefabrica.com/wp-content/uploads/2021/02/08/icon-car-blue-color-Graphics-8432709-1.jpg'),),
SizedBox(width: 10,),
Text('Standard Car',style: TextStyle(color: Colors.black,fontSize: 12,fontWeight: FontWeight.bold),),
Expanded(
child:
Align(alignment: Alignment.centerRight, child: Text('2 - 4 Peoples',style: TextStyle(color: Colors.black,fontSize: 12),)),
)
]),
SizedBox(height: 10),
Container(height: 1, width: double.infinity, color: RegentGray),
SizedBox(height: 20),
Container(decoration: BoxDecoration(borderRadius: BorderRadius.circular(5), border: Border.all(color: Colors.green),),
child: Padding(
padding: const EdgeInsets.only(left: 20,top: 8,right: 20,bottom: 8),
child: Text('Edit', style: TextStyle(color: Colors.green),),
),
),
]),
)),
SizedBox(height: 10),
Container( decoration: BoxDecoration(border: Border.all(color: Color(0XffF0F4F7)), color: SecondaryColor, borderRadius: BorderRadius.circular(10.0)),
child: Padding(
padding: const EdgeInsets.all(20),
child: Column(mainAxisAlignment: MainAxisAlignment.start,crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(decoration: BoxDecoration(borderRadius: BorderRadius.circular(10)),
child: Column(children: [
Row(children: [
Text('Fare Details',style: TextStyle(color: Navy,fontSize: 15,fontWeight: FontWeight.bold),),
Expanded(child: Align(alignment: Alignment.centerRight, child: Text('\$5.50',style: TextStyle(color: Navy,fontSize: 15, fontWeight: FontWeight.bold),))),
],),
SizedBox(height: 10,),
Container(height: 1, width: double.infinity, color: RegentGray),
SizedBox(height: 10,),
Row(children: [
Text('Trip Fare',style: TextStyle(color: RegentGray),),
Expanded(child: Align(alignment: Alignment.centerRight, child: Text('\$7.99',style: TextStyle(color: RegentGray),))),
],),
SizedBox(height: 10,),
Row(children: [
Text('Platform Fee',style: TextStyle(color: RegentGray),),
Expanded(child: Align(alignment: Alignment.centerRight, child: Text('\$7.99',style: TextStyle(color: RegentGray),))),
],),
SizedBox(height: 10,),
Row(children: [
Text('Platform Discount',style: TextStyle(color: RegentGray),),
Expanded(child: Align(alignment: Alignment.centerRight, child: Text('-\$2.49',style: TextStyle(color: RegentGray),))),
],),
SizedBox(height: 10,),
Row(children: [
Text('Total',style: TextStyle(color: Navy, fontWeight: FontWeight.bold),),
Expanded(child: Align(alignment: Alignment.centerRight, child: Text('\$0.70',style: TextStyle(color: RegentGray,fontWeight: FontWeight.bold),))),
],),
],),)
],
),
),
),
SizedBox(height: 40,),
Container( height: 60, decoration: BoxDecoration(color: Colors.black, borderRadius: BorderRadius.circular(20)),
child:Padding(
padding: const EdgeInsets.all(10.0),
child: Center(
child: ( Row(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [
IconButton(onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => OrderConfirm()),);
}, icon: Icon(FontAwesomeIcons.bookmark),color: PrimaryColor, iconSize: 20,),
Expanded(child: Text('Order Now',style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold, color: Colors.white),))
],)
),
),
)
)
],)
,),
),
);
}
}
Comments
Post a Comment