Skip to content

Commit

Permalink
railway previous pass redesigned
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicRaptor committed Jul 9, 2024
1 parent 3a821b9 commit 23cbdb8
Showing 1 changed file with 95 additions and 11 deletions.
106 changes: 95 additions & 11 deletions lib/new_ui/screens/railway_screen/railway_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ class _RailwayConcessionScreenState
ConcessionRequestModel? concessionRequestData = ref.watch(concessionRequestDetailProvider);
String formattedDate = lastPassIssued != null
? DateFormat('dd/MM/yyyy').format(lastPassIssued!)
: '';
: 'null';

String currState = ref.watch(concessionProvider);
bool buttonTrigger(ConcessionStatus){
Expand Down Expand Up @@ -537,7 +537,7 @@ class _RailwayConcessionScreenState
),
),
),

Container(
width: size.width * 0.7,
child: InkWell(
Expand Down Expand Up @@ -641,7 +641,7 @@ class _RailwayConcessionScreenState
"Class: ${travelClass}",
style: TextStyle(fontSize: 16, color: Colors.white),
),
if (concessionRequestData?.passCollected != null &&
concessionRequestData!.passCollected!['collected'] == "1") ...[
SizedBox(
Expand All @@ -652,17 +652,17 @@ class _RailwayConcessionScreenState
style: TextStyle(fontSize: 13, color: Colors.grey),
),
],
],
),
),
SizedBox(
height: 15,
),
InkWell(onTap: ()=> Navigator.push(context, MaterialPageRoute(builder: (context)=> GuideLinesScreen(),),),child: Text("View Guidelines",style: TextStyle(color: Colors.white),),),
],
),
)*/
Expand All @@ -674,6 +674,7 @@ class _RailwayConcessionScreenState
child: Stack(
alignment: Alignment.center,
children: [
if (concessionDetails!.status == "serviced")
Positioned(top: 50,child: Container(
width: size.width,
decoration: BoxDecoration(
Expand All @@ -682,15 +683,18 @@ class _RailwayConcessionScreenState
borderRadius: BorderRadius.only(topLeft: Radius.circular(size.width*0.1),topRight: Radius.circular(size.width*0.1),),
),
child: const SizedBox(height: 50,),
),),
),)
else
Positioned(bottom: 20, child: Text("You don't have any ongoing pass",
style: TextStyle(color: Colors.white),),),
Positioned(top: 20,child: Container(
width: size.width*0.75,
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(size.width*0.05),
border: Border.all(color: Colors.white),
boxShadow: [
BoxShadow(offset: Offset.fromDirection(1),spreadRadius: 2,color: Colors.black,blurRadius: 2)
BoxShadow(offset: Offset.fromDirection(2),spreadRadius: 2,color: Colors.black,blurRadius: 2)
],
),
alignment: Alignment.center,
Expand All @@ -702,17 +706,97 @@ class _RailwayConcessionScreenState
),
Container(
width: size.width,
height: size.height*0.4,
decoration: const BoxDecoration(
color: Colors.blue,
border: Border.symmetric(vertical: BorderSide(color: Colors.white),),
),
child: Text("Center"),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10,horizontal: 20),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Ongoing Pass",
style: TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold),
),
SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Certificate Number", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),),
Text("${concessionRequestData != null ? concessionRequestData.passNum : "not assigned"}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text("Date of Issue", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),),
Text(formattedDate, style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),),
],
)
],
),
const SizedBox(height: 15,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Travel Lane", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),),
Text("${travelLane}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("From", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),),
Text("${homeStation}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text("To", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),),
Text("Bandra", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),),
],
)
],
),
const SizedBox(height: 15,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Duration of pass", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),),
Text("${duration}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text("Class", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),),
Text(travelClass == "I" ? "First Class" : "Second Class", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),),
],
),
//const SizedBox()
],
),
],
),
),
),
],
)



else
Container(
width: size.width * 0.8,
Expand Down

0 comments on commit 23cbdb8

Please sign in to comment.