Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

railway previous pass redesigned #185

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading