Skip to content

Commit

Permalink
Merge pull request #114 from SayedZeeshanHyder/main
Browse files Browse the repository at this point in the history
Made the Required Changes , Error Fixes
  • Loading branch information
SayedZeeshanHyder authored Jun 5, 2024
2 parents 77b05f5 + 689ec07 commit 0e43efd
Show file tree
Hide file tree
Showing 23 changed files with 73 additions and 269 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import 'package:tsec_app/screens/departmentlist_screen/department_list.dart';
import 'package:tsec_app/utils/department_enum.dart';
// import 'package:tsec_app/screens/railwayConcession/railwayConcession.dart';
// import 'package:tsec_app/screens/splash_screen.dart';
import 'firebase_options.dart';
//import 'firebase_options.dart';
import 'provider/app_state_provider.dart';
import 'provider/shared_prefs_provider.dart';
import 'provider/theme_provider.dart';
Expand All @@ -36,6 +36,7 @@ import 'provider/theme_provider.dart';
// import 'screens/tpc_screen.dart';
import 'utils/init_get_it.dart';
import 'utils/themes.dart';
import 'firebase_options.example.dart';

// To handle all the background messages
// Currently not used but wont work if not present
Expand All @@ -46,7 +47,7 @@ Future<void> main() async {

WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
//options: DefaultFirebaseOptions.currentPlatform,
);
// if (debugMode) {
// try {
Expand Down Expand Up @@ -207,6 +208,7 @@ class _TSECAppState extends ConsumerState<TSECApp> {

final _themeMode = ref.watch(themeProvider);
return MaterialApp.router(
debugShowCheckedModeBanner: false,
builder: (context, child) =>
MediaQuery(data: getTextScale(context), child: child!),
routeInformationProvider: _routes.routeInformationProvider,
Expand Down
8 changes: 4 additions & 4 deletions lib/new_ui/screens/event_details_screen/event_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class _EventDetailState extends ConsumerState<EventDetail> {
children: [
Text(
"About",
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.bodyMedium,
),
],
),
Expand All @@ -203,7 +203,7 @@ class _EventDetailState extends ConsumerState<EventDetail> {
}
},
text: widget.eventModel.eventDescription,
style: Theme.of(context).textTheme.subtitle2,
style: Theme.of(context).textTheme.displayMedium,
linkStyle: const TextStyle(color: Colors.blue),
),
),
Expand All @@ -213,7 +213,7 @@ class _EventDetailState extends ConsumerState<EventDetail> {
children: [
Text(
"Organisers",
style: Theme.of(context).textTheme.headline5,
style: Theme.of(context).textTheme.headlineSmall,
),
],
),
Expand All @@ -239,7 +239,7 @@ class _EventDetailState extends ConsumerState<EventDetail> {
),
Text(
widget.eventModel.committeeName,
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.displayMedium,
),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ContainerIconWithName extends StatelessWidget {
child: GestureDetector(
onTap: onPressed,
child: Container(
height: MediaQuery.of(context).size.height * 0.14,
//height: MediaQuery.of(context).size.height * 0.14,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: _theme.colorScheme.onSecondary,
Expand Down
7 changes: 4 additions & 3 deletions lib/new_ui/screens/home_screen/widgets/home_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ class _HomeWidgetState extends ConsumerState<HomeWidget> {
data: ((data) {
eventList.addAll(data ?? []);
imgList.clear();
for (var data in eventList) {
imgList.add(data.imageUrl);
for (var data2 in eventList) {
imgList.add(data2.imageUrl);
}
// imgList = [imgList[0]];
if (imgList.length == 1) shouldLoop = false;
}),

loading: () {
const CircularProgressIndicator();
},
Expand Down Expand Up @@ -87,7 +88,7 @@ class _HomeWidgetState extends ConsumerState<HomeWidget> {
SingleChildScrollView(
child: Column(
children: [
if (data != null && data.isStudent) const ExpandedCard(),
// if (data != null && data.isStudent) const ExpandedCard(),
if (data != null && data.isStudent)
Row(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down
3 changes: 1 addition & 2 deletions lib/new_ui/screens/main_screen/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class _MainScreenState extends ConsumerState<MainScreen> {
),
),
Container(
width: MediaQuery.of(context).size.width * .5,
padding: EdgeInsets.only(left: 10),
child: Text(
currentPage == 0
Expand All @@ -133,7 +132,7 @@ class _MainScreenState extends ConsumerState<MainScreen> {
style: Theme.of(context)
.textTheme
.headlineLarge!
.copyWith(fontSize: 30, color: Colors.white),
.copyWith(fontSize: 15, color: Colors.white),
maxLines: 1,
overflow: TextOverflow.fade,
),
Expand Down
16 changes: 9 additions & 7 deletions lib/new_ui/screens/profile_screen/profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,15 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
data.isStudent
? data.studentModel!.name
: data.facultyModel!.name,
style: Theme.of(context)
.textTheme
.labelLarge,
Container(
width: MediaQuery.of(context).size.width*0.7,
child: Text(
data.isStudent
? data.studentModel!.name
: data.facultyModel!.name,
style: TextStyle(fontWeight: FontWeight.bold,fontSize: 18,color: Colors.white),

),
),
data.isStudent
? SizedBox(height: 15)
Expand Down
3 changes: 2 additions & 1 deletion lib/new_ui/screens/timetable_screen/timetable_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class TimeTable extends ConsumerWidget {
NotificationType.makeTopic(ref, data.studentModel);
}

print(dayProvider);
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down Expand Up @@ -74,7 +75,7 @@ class TimeTable extends ConsumerWidget {
padding: const EdgeInsets.all(20),
child: Container(
width: _size.width * 0.9,
height: MediaQuery.of(context).size.height * 0.10,
height: 100,
// could have used _size but fuck it whore-licks
child: ClipRRect(
borderRadius: BorderRadius.circular(15.0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class _DepartmentScreenAppBarState
),
title: Text(
"Department",
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.bodyLarge,
),
centerTitle: true,
actions: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DropDownMenuItem extends StatelessWidget {
onTap: onTap,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(title, style: Theme.of(context).textTheme.bodyText2),
child: Text(title, style: Theme.of(context).textTheme.bodyMedium),
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class CustomAppBarForLogin extends StatelessWidget {
Flexible(
child: Text(
title,
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
),
Flexible(
child: Text(
description,
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
),
Flexible(
Expand Down
6 changes: 3 additions & 3 deletions lib/screens/login_screen/widgets/custom_login_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class _LoginWidgetState extends ConsumerState<LoginWidget> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("Email", style: Theme.of(context).textTheme.subtitle1),
Text("Email", style: Theme.of(context).textTheme.displayMedium),
SizedBox(
height: 5,
),
Expand Down Expand Up @@ -101,7 +101,7 @@ class _LoginWidgetState extends ConsumerState<LoginWidget> {
height: 10,
),
Text("Password",
style: Theme.of(context).textTheme.subtitle1),
style: Theme.of(context).textTheme.displayMedium),
SizedBox(
height: 5,
),
Expand Down Expand Up @@ -218,7 +218,7 @@ class _LoginWidgetState extends ConsumerState<LoginWidget> {
},
child: Text(
"Skip",
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.displayMedium,
),
),
const Spacer(),
Expand Down
10 changes: 5 additions & 5 deletions lib/screens/main_screen/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class MainScreen extends ConsumerWidget {
borderRadius: BorderRadius.circular(15.0),
child: DatePicker(
DateTime.now(),
monthTextStyle: _theme.textTheme.subtitle2!,
dayTextStyle: _theme.textTheme.subtitle2!,
dateTextStyle: _theme.textTheme.subtitle2!,
monthTextStyle: _theme.textTheme.displayMedium!,
dayTextStyle: _theme.textTheme.displayMedium!,
dateTextStyle: _theme.textTheme.displayMedium!,
initialSelectedDate: DateTime.now(),
selectionColor: Colors.blue,
onDateChange: ((selectedDate) async {
Expand Down Expand Up @@ -174,7 +174,7 @@ class _MainScreenAppBarState extends ConsumerState<MainScreenAppBar> {
launchUrlcollege();
},
child: Text("Thadomal Shahani Engineering College",
style: Theme.of(context).textTheme.headline3),
style: Theme.of(context).textTheme.headlineMedium),
),
),
data == null
Expand Down Expand Up @@ -215,7 +215,7 @@ class _MainScreenAppBarState extends ConsumerState<MainScreenAppBar> {
"Bandra, Mumbai",
style: Theme.of(context)
.primaryTextTheme
.bodyText1!
.bodyMedium!
.copyWith(color: kLightModeDarkBlue),
),
],
Expand Down
10 changes: 5 additions & 5 deletions lib/screens/main_screen/widget/schedule_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ScheduleCard extends StatelessWidget {
lectureStartTime,
textAlign: TextAlign.center,
style: TextStyle(
color: _theme.textTheme.headline1!.color,
color: _theme.textTheme.headlineMedium!.color,
fontWeight: FontWeight.w400,
fontSize: 16.0,
letterSpacing: 1.0,
Expand All @@ -85,7 +85,7 @@ class ScheduleCard extends StatelessWidget {
Text(
'to',
style: TextStyle(
color: _theme.textTheme.headline1!.color,
color: _theme.textTheme.headlineMedium!.color,
fontWeight: FontWeight.w300,
fontSize: 16.0,
letterSpacing: 1.0,
Expand All @@ -95,7 +95,7 @@ class ScheduleCard extends StatelessWidget {
Text(
lectureEndTime,
style: TextStyle(
color: _theme.textTheme.headline1!.color,
color: _theme.textTheme.headlineMedium!.color,
fontWeight: FontWeight.w400,
fontSize: 16.0,
letterSpacing: 1.0,
Expand All @@ -120,7 +120,7 @@ class ScheduleCard extends StatelessWidget {
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: _theme.textTheme.headline1!.color,
color: _theme.textTheme.headlineMedium!.color,
fontWeight: FontWeight.w400,
fontSize: 20.0,
letterSpacing: 1.0,
Expand All @@ -134,7 +134,7 @@ class ScheduleCard extends StatelessWidget {
child: Text(
'Batch : $lectureBatch',
style: TextStyle(
color: _theme.textTheme.headline2!.color,
color: _theme.textTheme.headlineMedium!.color,
fontWeight: FontWeight.w300,
fontSize: 17.0,
letterSpacing: 1.0,
Expand Down
7 changes: 3 additions & 4 deletions lib/screens/notification_screen/notification_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutterfire_ui/firestore.dart';
import 'package:intl/intl.dart';
import 'package:tsec_app/screens/notification_screen/widgets/notification_list_item.dart';
import 'package:tsec_app/services/notification_service.dart';
Expand Down Expand Up @@ -36,8 +35,8 @@ class _NotificationScreenState extends State<NotificationScreen> {
image: Image.asset(ImageAssets.committes),
),
)
],
body: FirestoreListView<NotificationModel>(
], body: Column(),
/*body: FirestoreListView<NotificationModel>(
query: locator<NotificationService>()
.notificationQuery
.orderBy("notificationTime", descending: true),
Expand All @@ -58,7 +57,7 @@ class _NotificationScreenState extends State<NotificationScreen> {
],
);
},
),
),*/
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NotificationListItem extends StatelessWidget {
Expanded(
child: Text(
notificationModel.title,
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyMedium,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/theme_screen/theme_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class ThemeScreen extends StatelessWidget {
const SizedBox(height: 40),
Text(
"Choose a style",
style: Theme.of(context).textTheme.headline3,
style: Theme.of(context).textTheme.headlineMedium,
),
const SizedBox(height: 15),
Text(
"Pop or subtle. Day or night. \n Customize your interface.",
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.displayMedium,
),
SizedBox(height: 0.05 * _height),
Consumer(
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/theme_screen/widgets/custom_toggle_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class _CustomToggleButtonState extends ConsumerState<CustomToggleButton> {
padding: EdgeInsets.symmetric(horizontal: width * 0.1),
child: Text(
widget.values[index],
style: Theme.of(context).textTheme.bodyText2,
style: Theme.of(context).textTheme.bodyMedium,
),
),
),
Expand All @@ -92,7 +92,7 @@ class _CustomToggleButtonState extends ConsumerState<CustomToggleButton> {
),
child: Text(
_theme == ThemeMode.light ? widget.values[0] : widget.values[1],
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyMedium,
),
alignment: Alignment.center,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/custom_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class CustomAppBar extends ConsumerWidget implements PreferredSizeWidget {
Expanded(
child: Text(
title,
style: Theme.of(context).textTheme.headline3,
style: Theme.of(context).textTheme.headlineMedium,
),
),
SizedBox(
Expand Down
Loading

0 comments on commit 0e43efd

Please sign in to comment.