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

Dark theme color fix on city bus screen #33

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
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
116 changes: 77 additions & 39 deletions frontend/lib/screens/city_bus_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ class _CityBusScreenState extends State<CityBusScreen>
length: 3,
child: Scaffold(
appBar: AppBar(
title: const Text('City Bus',
title: Text('City Bus',
style: TextStyle(
color: Colors.black,
color: Theme.of(context).textTheme.bodyLarge?.color,
fontSize: 20,
fontWeight: FontWeight.bold)),
bottom: TabBar(
Expand Down Expand Up @@ -151,14 +151,22 @@ class _CityBusScreenState extends State<CityBusScreen>
Text(
startingPoint,
style: TextStyle(
color: Colors.black.withOpacity(0.8),
color: Theme.of(context)
.textTheme
.bodyLarge
?.color
?.withOpacity(0.8),
fontWeight: FontWeight.bold,
fontSize: 25),
),
Text(
destination,
style: TextStyle(
color: Colors.black.withOpacity(0.8),
color: Theme.of(context)
.textTheme
.bodyLarge
?.color
?.withOpacity(0.8),
fontWeight: FontWeight.bold,
fontSize: 25),
),
Expand All @@ -184,7 +192,11 @@ class _CityBusScreenState extends State<CityBusScreen>
child: Text(
'Transaction ID for next bus will be noted from 4pm',
style: TextStyle(
color: Colors.black.withOpacity(0.8),
color: Theme.of(context)
.textTheme
.bodyLarge
?.color
?.withOpacity(0.8),
fontWeight: FontWeight.w500,
fontSize: 16),
),
Expand All @@ -200,7 +212,11 @@ class _CityBusScreenState extends State<CityBusScreen>
// labelText: 'Transaction ID',
hintText: 'Transaction ID',
filled: true,
fillColor: Colors.black.withOpacity(0.1),
fillColor: Theme.of(context)
.textTheme
.bodyLarge
?.color
?.withOpacity(0.1),
border: InputBorder.none,
),
),
Expand All @@ -217,7 +233,10 @@ class _CityBusScreenState extends State<CityBusScreen>
onTap: submitTransactionID,
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.black.withOpacity(0.3)),
border: Border.all(
color: Theme.of(context).brightness == Brightness.light
? Colors.black.withOpacity(0.3)
: Colors.white.withOpacity(0.3)),
borderRadius: BorderRadius.circular(50),
),
child: Padding(
Expand All @@ -239,47 +258,67 @@ class _CityBusScreenState extends State<CityBusScreen>
children: [
transactionDetails != null
? Column(
children: [
QrImageView(
children: [
QrImageView(
data: transactionDetails.toString(),
eyeStyle: QrEyeStyle(
eyeShape: QrEyeShape.square,
color: Theme.of(context).textTheme.bodyLarge?.color,
),
dataModuleStyle: QrDataModuleStyle(
dataModuleShape: QrDataModuleShape.square,
color: Theme.of(context).textTheme.bodyLarge?.color,
),
version: QrVersions.auto,
size: 200.0,
),
SizedBox(height: 20),
Text('${transactionDetails?['name']}', style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black.withOpacity(0.8),
fontSize: 24
),),
Text('${transactionDetails?['email']}', style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black.withOpacity(0.8),
fontSize: 20
),),
Text('${transactionDetails?['travelDate']}, ${transactionDetails?['busTiming']}', style: TextStyle(
fontWeight: FontWeight.w500,
color: Colors.black.withOpacity(0.8),
fontSize: 24
),),
Text('isUsed: ${transactionDetails?['isUsed'].toString()}', style: TextStyle(
fontWeight: FontWeight.w500,
color: Colors.black.withOpacity(0.8),
fontSize: 16
),),
SizedBox(height: 20,),
Text('Transaction ID: ${transactionDetails?['transactionId']}', style: TextStyle(
fontWeight: FontWeight.w500,
color: Colors.black.withOpacity(0.8),
fontSize: 16
),),
],
)
Text(
'${transactionDetails?['name']}',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.8),
fontSize: 24),
),
Text(
'${transactionDetails?['email']}',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.8),
fontSize: 20),
),
Text(
'${transactionDetails?['travelDate']}, ${transactionDetails?['busTiming']}',
style: TextStyle(
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.8),
fontSize: 24),
),
Text(
'isUsed: ${transactionDetails?['isUsed'].toString()}',
style: TextStyle(
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.8),
fontSize: 16),
),
SizedBox(
height: 20,
),
Text(
'Transaction ID: ${transactionDetails?['transactionId']}',
style: TextStyle(
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.8),
fontSize: 16),
),
],
)
: SizedBox(),
],
);
}

Column schedule(){
Column schedule() {
return Column(
children: [
Expanded(
Expand Down Expand Up @@ -309,7 +348,6 @@ class _CityBusScreenState extends State<CityBusScreen>
);
}

}

class FullScheduleWidget extends StatelessWidget {
final Map<String, int> toIITH;
Expand Down
83 changes: 48 additions & 35 deletions frontend/lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:dashbaord/services/shared_service.dart';
import 'package:dashbaord/utils/bus_schedule.dart';
import 'package:dashbaord/utils/loading_widget.dart';
import 'package:dashbaord/widgets/homeScreenCardSmall.dart';
import 'package:dashbaord/widgets/home_card_no_options.dart';
import 'package:dashbaord/widgets/home_screen_appbar.dart';
import 'package:dashbaord/widgets/home_screen_bus_timings.dart';
import 'package:dashbaord/widgets/home_screen_calendar.dart';
Expand Down Expand Up @@ -507,27 +508,13 @@ class _HomeScreenState extends State<HomeScreen> {
const SizedBox(height: 20),
HomeScreenMessMenu(messMenu: messMenu),
const SizedBox(height: 20),
Padding(
padding: const EdgeInsets.only(left: 18, top: 0),
child: Text(
'Services',
style: GoogleFonts.inter(
color: Theme.of(context)
.textTheme
.bodyLarge
?.color,
fontWeight: FontWeight.bold,
fontSize: 28,
),
),
),

Wrap(
spacing: 10.0, // Horizontal spacing between cards
runSpacing: 10.0, // Vertical spacing between rows
children: [
SizedBox(
width: MediaQuery.of(context).size.width / 2 -
25, // Half of the screen width minus spacing
width: MediaQuery.of(context).size.width / 2 - 25, // Half of the screen width minus spacing
child: HomeScreenCardSmall(
isComingSoon: false,
title: 'Cab Sharing',
Expand All @@ -536,18 +523,18 @@ class _HomeScreenState extends State<HomeScreen> {
widget.isGuest
? showError()
: context.push('/cabsharing', extra: {
'user': userModel ??
UserModel(
email: "[email protected]",
name: "User"),
'image': image,
});
'user': userModel ??
UserModel(
email: "[email protected]",
name: "User"),
'image': image,
});

},
),
),
SizedBox(
width:
MediaQuery.of(context).size.width / 2 - 25,
width: MediaQuery.of(context).size.width / 2 - 25,
child: HomeScreenCardSmall(
isComingSoon: false,
isLnF: true,
Expand All @@ -556,31 +543,57 @@ class _HomeScreenState extends State<HomeScreen> {
onTap: widget.isGuest
? showError
: () => context.push('/lnf', extra: {
'currentUserEmail':
userModel?.email ??
'[email protected]'
}),
'currentUserEmail': userModel?.email ?? '[email protected]'
}),
),
),
SizedBox(
width:
MediaQuery.of(context).size.width / 2 - 25,
width: MediaQuery.of(context).size.width / 2 - 25,
child: HomeScreenCardSmall(
isComingSoon: false,
title: 'Patencheru Bus',
child: 'assets/icons/cab-sharing-icon.svg',
onTap: () {
widget.isGuest
? showError()
: context.push('/city_bus');
widget.isGuest ?
showError() :
context.push('/city_bus');
},
),
),
],
),

const SizedBox(height: 48),

const SizedBox(height: 20),
// HomeCardNoOptions(
// isComingSoon: true,
// title: 'Cab Sharing',
// child: 'assets/icons/cab-sharing-icon.svg',
// onTap: () {
// widget.isGuest
// ? showError()
// : context.push('/cabsharing', extra: {
// 'user': userModel ??
// UserModel(
// email: "[email protected]",
// name: "User"),
// 'image': image,
// });
// },
// ),
// const SizedBox(height: 20),
// HomeCardNoOptions(
// isComingSoon: false,
// isLnF: true,
// title: 'Lost & Found',
// child: 'assets/icons/magnifying-icon.svg',
// onTap: widget.isGuest
// ? showError
// : () => context.push('/lnf', extra: {
// 'currentUserEmail':
// userModel?.email ?? '[email protected]'
// }),
// ),
// const SizedBox(height: 20),
],
),
),
Expand Down
Loading