Skip to content

Commit

Permalink
Readme file updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Shrivastav committed Nov 29, 2023
1 parent f7b7ba5 commit 0b29628
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# parking_system
Download [here](https://drive.google.com/file/d/1UcO6HYqFbsynQo0NCSF38wkkloqozmb2/view?usp=sharing)
Download [here](https://drive.google.com/file/d/1Ag8yBDnlf5JXT8nGj3N9bkCtH8YBvNJH/view?usp=sharing)
6 changes: 3 additions & 3 deletions lib/backend/timediff.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ String getFare(String time, String vehicleType) {
final difference = currentTime.difference(parkedDate);
if (vehicleType.startsWith("4")) {
double fare = 30 * (difference.inHours / 3);
return fare == 0 ? "30" : "$fare";
return fare == 0 ? "30" : fare.toString().substring(0,3);
} else if (vehicleType.startsWith("2")) {
double fare = 20 * (difference.inHours / 3);
return fare == 0 ? "20" : "$fare";
return fare == 0 ? "20" : fare.toString().substring(0,3);
} else {
double fare = 5 * (difference.inHours / 3);
return fare == 0 ? "5" : "$fare";
return fare == 0 ? "5" : fare.toString().substring(0,3);
}
}

0 comments on commit 0b29628

Please sign in to comment.