Skip to content

Commit

Permalink
timetable fix batch 22 (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
asutoshranjan committed Nov 16, 2022
1 parent 86d538f commit b0d7c98
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 102 deletions.
148 changes: 74 additions & 74 deletions scp/lib/time_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TimeTableState extends State<TimeTable> {
if (!isAutumnSemester && theorySection.compareTo('Ar.') != 0) {
theorySection = TimeTableResources.subsituteTheorySection[theorySection];
practicalSection =
TimeTableResources.substitutePracticalSection[practicalSection];
TimeTableResources.substitutePracticalSection[practicalSection];
}
}

Expand Down Expand Up @@ -124,20 +124,20 @@ class TimeTableState extends State<TimeTable> {
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,
),
Expand All @@ -146,7 +146,7 @@ class TimeTableState extends State<TimeTable> {
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()),
),
),
Expand Down Expand Up @@ -231,9 +231,9 @@ class TimeTableState extends State<TimeTable> {
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,
),
Expand Down Expand Up @@ -298,24 +298,24 @@ class TimeTableState extends State<TimeTable> {
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
children: <TextSpan>[
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>[
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,
),
),
],
)),
),
]),
),
Expand Down Expand Up @@ -350,25 +350,25 @@ class TimeTableState extends State<TimeTable> {
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
children: <TextSpan>[
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>[
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,
Expand All @@ -391,7 +391,7 @@ class TimeTableState extends State<TimeTable> {
width: 3,
),
Text(
'Location',
'Location',
style: TextStyle(
color: Colors.white,
fontSize: 18.5,
Expand All @@ -404,7 +404,7 @@ class TimeTableState extends State<TimeTable> {
onPressed: () {
launchMap(periodDetail.location);
}
),
),
),
),
]),
Expand Down Expand Up @@ -440,24 +440,24 @@ class TimeTableState extends State<TimeTable> {
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
children: <TextSpan>[
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>[
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,
),
),
],
)),
),
]),
),
Expand Down Expand Up @@ -517,15 +517,15 @@ class TimeTableState extends State<TimeTable> {
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'],
Expand Down
56 changes: 28 additions & 28 deletions scp/lib/time_table_resources.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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'
Expand All @@ -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'
},
Expand All @@ -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'
},
Expand All @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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'
},
};
Expand Down Expand Up @@ -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});
}

0 comments on commit b0d7c98

Please sign in to comment.