From b0d7c98778f6a3fa9a293b1e612aba202020e5e9 Mon Sep 17 00:00:00 2001 From: Asutosh Ranjan Date: Wed, 16 Nov 2022 14:36:23 +0530 Subject: [PATCH] timetable fix batch 22 (#272) --- scp/lib/time_table.dart | 148 +++++++++++++++--------------- scp/lib/time_table_resources.dart | 56 +++++------ 2 files changed, 102 insertions(+), 102 deletions(-) diff --git a/scp/lib/time_table.dart b/scp/lib/time_table.dart index 7ae4d54..36a1829 100644 --- a/scp/lib/time_table.dart +++ b/scp/lib/time_table.dart @@ -46,7 +46,7 @@ class TimeTableState extends State { if (!isAutumnSemester && theorySection.compareTo('Ar.') != 0) { theorySection = TimeTableResources.subsituteTheorySection[theorySection]; practicalSection = - TimeTableResources.substitutePracticalSection[practicalSection]; + TimeTableResources.substitutePracticalSection[practicalSection]; } } @@ -124,20 +124,20 @@ class TimeTableState extends State { unselectedLabelStyle: TextStyle( color: primaryColor.withAlpha(100), fontSize: 20), labelPadding: - EdgeInsets.symmetric(vertical: 16.0, horizontal: 48.0), + EdgeInsets.symmetric(vertical: 16.0, horizontal: 48.0), indicatorColor: Colors.transparent, tabs: TimeTableResources.sequence[sectionSequence].keys .map( (day) => Tab( - child: Text( - day, - style: TextStyle( - color: primaryColor, - fontWeight: FontWeight.w700, - ), - ), + child: Text( + day, + style: TextStyle( + color: primaryColor, + fontWeight: FontWeight.w700, ), - ) + ), + ), + ) .toList(), isScrollable: true, ), @@ -146,7 +146,7 @@ class TimeTableState extends State { body: TabBarView( children: TimeTableResources.sequence[sectionSequence].entries .map((entry) => Container( - child: buildList(context, entry.key, entry.value))) + child: buildList(context, entry.key, entry.value))) .toList()), ), ), @@ -231,9 +231,9 @@ class TimeTableState extends State { child: AutoSizeText( periodDetail.slotTime, style: TextStyle( - color: Colors.white.withAlpha(200), - fontSize: 16.0, - fontWeight: FontWeight.w600, + color: Colors.white.withAlpha(200), + fontSize: 16.0, + fontWeight: FontWeight.w600, ), maxLines: 1, ), @@ -298,24 +298,24 @@ class TimeTableState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - children: [ - TextSpan( - text: periodDetail.name + '\n', - style: TextStyle( - color: Colors.white, - fontSize: 20.0, - fontWeight: FontWeight.w700), - ), - TextSpan( - text: periodDetail.slotTime, - style: TextStyle( - color: Colors.white.withAlpha(200), - fontSize: 16.0, - fontWeight: FontWeight.w600, - ), - ), - ], - )), + children: [ + TextSpan( + text: periodDetail.name + '\n', + style: TextStyle( + color: Colors.white, + fontSize: 20.0, + fontWeight: FontWeight.w700), + ), + TextSpan( + text: periodDetail.slotTime, + style: TextStyle( + color: Colors.white.withAlpha(200), + fontSize: 16.0, + fontWeight: FontWeight.w600, + ), + ), + ], + )), ), ]), ), @@ -350,25 +350,25 @@ class TimeTableState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - children: [ - TextSpan( - text: periodDetail.name + '\n', - style: TextStyle( - color: Colors.white, - fontSize: 20.0, - fontWeight: FontWeight.w700, - ), - ), - TextSpan( - text: periodDetail.slotTime, - style: TextStyle( - color: Colors.white.withAlpha(200), - fontSize: 16.0, - fontWeight: FontWeight.w600, - ), - ), - ], - )), + children: [ + TextSpan( + text: periodDetail.name + '\n', + style: TextStyle( + color: Colors.white, + fontSize: 20.0, + fontWeight: FontWeight.w700, + ), + ), + TextSpan( + text: periodDetail.slotTime, + style: TextStyle( + color: Colors.white.withAlpha(200), + fontSize: 16.0, + fontWeight: FontWeight.w600, + ), + ), + ], + )), ), Align( alignment: Alignment.bottomCenter, @@ -391,7 +391,7 @@ class TimeTableState extends State { width: 3, ), Text( - 'Location', + 'Location', style: TextStyle( color: Colors.white, fontSize: 18.5, @@ -404,7 +404,7 @@ class TimeTableState extends State { onPressed: () { launchMap(periodDetail.location); } - ), + ), ), ), ]), @@ -440,24 +440,24 @@ class TimeTableState extends State { alignment: Alignment.topLeft, child: RichText( text: TextSpan( - children: [ - TextSpan( - text: periodDetail.name + '\n', - style: TextStyle( - color: Colors.white, - fontSize: 20.0, - fontWeight: FontWeight.w700), - ), - TextSpan( - text: periodDetail.slotTime, - style: TextStyle( - color: Colors.white.withAlpha(200), - fontSize: 16.0, - fontWeight: FontWeight.w600, - ), - ), - ], - )), + children: [ + TextSpan( + text: periodDetail.name + '\n', + style: TextStyle( + color: Colors.white, + fontSize: 20.0, + fontWeight: FontWeight.w700), + ), + TextSpan( + text: periodDetail.slotTime, + style: TextStyle( + color: Colors.white.withAlpha(200), + fontSize: 16.0, + fontWeight: FontWeight.w600, + ), + ), + ], + )), ), ]), ), @@ -517,15 +517,15 @@ class TimeTableState extends State { slotLength: 1, type: 'theory', location: - 'https://www.google.com/maps/search/?api=1&query=22.2513332,84.9048918', - locationName: 'LA1', + 'https://www.google.com/maps/search/?api=1&query=22.25082839,84.90534609', + locationName: 'LA-II', ); slotFilled[j] = true; } else if (TimeTableResources.practical[practicalSection] .containsKey(codes[i])) { dayList[j] = PeriodDetails( name: TimeTableResources.practicalDetails[ - TimeTableResources.practical[practicalSection][codes[i]]]['name'], + TimeTableResources.practical[practicalSection][codes[i]]]['name'], slotTime: getSlotTime(j, j + 2), location: TimeTableResources.practicalDetails[TimeTableResources .practical[practicalSection][codes[i]]]['location'], diff --git a/scp/lib/time_table_resources.dart b/scp/lib/time_table_resources.dart index e82556b..249a4b2 100644 --- a/scp/lib/time_table_resources.dart +++ b/scp/lib/time_table_resources.dart @@ -12,12 +12,12 @@ abstract class TimeTableResources { static void setCourseNumber() async { courseNumber = await isAutumnSem() ? 'I' : 'II'; theory['A']['TA'] = theory['B']['TA'] = theory['C']['TB'] = - theory['D']['TB'] = theory['E']['TK'] = theory['F']['TK'] = - theory['G']['TM'] = theory['H']['TM'] = 'Physics-$courseNumber'; + theory['D']['TB'] = theory['E']['TK'] = theory['F']['TK'] = + theory['G']['TM'] = theory['H']['TM'] = 'Physics-$courseNumber'; theory['A']['TC'] = theory['B']['TC'] = theory['C']['TD'] = - theory['D']['TD'] = theory['E']['TJ'] = theory['F']['TJ'] = - theory['G']['TL'] = theory['H']['TL'] = 'Mathematics-$courseNumber'; + theory['D']['TD'] = theory['E']['TJ'] = theory['F']['TJ'] = + theory['G']['TL'] = theory['H']['TL'] = 'Mathematics-$courseNumber'; } static final sequence = { @@ -93,7 +93,7 @@ abstract class TimeTableResources { 'TB': 'Engineering Mechanics', 'TC': 'Principles of Architectural Designs', 'TD': 'Building Materials-I', - 'SB': 'Engineering Mechanics-Tutorial', + // 'SB': 'Engineering Mechanics-Tutorial', 'TG1': 'Communicative English', 'TG2': 'Communicative English', 'TG3': 'Communicative English' @@ -105,7 +105,7 @@ abstract class TimeTableResources { 'TD': 'Basic Electrical Engineering', 'TF': 'Chemistry', 'SA': 'Physics-Tutorial', - 'SB': 'Engineering Mechanics-Tutorial', + // 'SB': 'Engineering Mechanics-Tutorial', 'SC': 'Mathematics-Tutorial', 'TG3': 'Chemistry-Tutorial' }, @@ -116,7 +116,7 @@ abstract class TimeTableResources { 'TD': 'Basic Electrical Engineering', 'TF': 'Chemistry', 'SA': 'Physics-Tutorial', - 'SB': 'Engineering Mechanics-Tutorial', + // 'SB': 'Engineering Mechanics-Tutorial', 'SC': 'Mathematics-Tutorial', 'TG3': 'Chemistry-Tutorial' }, @@ -126,7 +126,7 @@ abstract class TimeTableResources { 'TC': 'Basic Electrical Engineering', 'TD': 'Mathematics-I', 'TF': 'Chemistry', - 'SA': 'Engineering Mechanics-Tutorial', + // 'SA': 'Engineering Mechanics-Tutorial', 'SB': 'Physics-Tutorial', 'TG1': 'Mathematics-Tutorial', 'TG3': 'Chemistry-Tutorial' @@ -137,7 +137,7 @@ abstract class TimeTableResources { 'TC': 'Basic Electrical Engineering', 'TD': 'Mathematics-I', 'TF': 'Chemistry', - 'SA': 'Engineering Mechanics-Tutorial', + // 'SA': 'Engineering Mechanics-Tutorial', 'SB': 'Physics-Tutorial', 'TG1': 'Mathematics-Tutorial', 'TG3': 'Chemistry-Tutorial' @@ -195,66 +195,66 @@ abstract class TimeTableResources { 'P3': {'PC': 'PL', 'PD': 'BP', 'PA': 'WP'}, 'P4': {'PD': 'PL', 'PX': 'BP', 'PB': 'WP'}, 'P5': {'PX': 'PL', 'PA': 'BP', 'PC': 'WP'}, - 'P6': {'PF': 'CL', 'PG': 'ED'}, - 'P7': {'PG': 'CL', 'PH': 'ED'}, - 'P8': {'PH': 'CL', 'PY': 'ED'}, - 'P9': {'PY': 'CL', 'PE': 'ED'}, - 'P10': {'PE': 'CL', 'PF': 'ED'}, + 'P6': {'PE': 'CL', 'PG': 'ED'}, + 'P7': {'PF': 'CL', 'PH': 'ED'}, + 'P8': {'PG': 'CL', 'PY': 'ED'}, + 'P9': {'PH': 'CL', 'PE': 'ED'}, + 'P10': {'PY': 'CL', 'PF': 'ED'}, }; static final practicalDetails = { 'AR1': { 'name': 'Architectural Graphics-I', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', + 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', 'locationName': 'TIIR' }, 'AR2': { 'name': 'Basic Design', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', + 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', 'locationName': 'TIIR' }, 'AR3': { 'name': 'Visual Arts-I', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', + 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', 'locationName': 'TIIR' }, 'AR4': { 'name': 'Non Graphic Computer Application', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', + 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', 'locationName': 'TIIR' }, 'PL': { 'name': 'Physics Laboratory', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', + 'https://www.google.com/maps/search/?api=1&query=22.2530845,84.9015978', 'locationName': 'Main Building' }, 'BP': { 'name': 'Basic Programming', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2513332,84.9048918', + 'https://www.google.com/maps/search/?api=1&query=22.2513332,84.9048918', 'locationName': 'LA1' }, 'WP': { 'name': 'Workshop Practices', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2526002,84.9029979', + 'https://www.google.com/maps/search/?api=1&query=22.2526002,84.9029979', 'locationName': 'Central Workshop' }, 'CL': { 'name': 'Chemistry Laboratory', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2523901,84.9010777', + 'https://www.google.com/maps/search/?api=1&query=22.2530523,84.9012673', 'locationName': 'Main Building' }, 'ED': { 'name': 'Engineering Drawing', 'location': - 'https://www.google.com/maps/search/?api=1&query=22.2513332,84.9048918', + 'https://www.google.com/maps/search/?api=1&query=22.2513332,84.9048918', 'locationName': 'LA1' }, }; @@ -294,9 +294,9 @@ class PeriodDetails { PeriodDetails( {this.name, - this.slotTime, - this.location, - this.locationName, - this.slotLength, - this.type}); + this.slotTime, + this.location, + this.locationName, + this.slotLength, + this.type}); }