-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yea
- Loading branch information
Showing
24 changed files
with
1,529 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,50 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.iqfareez.flutter_iium_schedule"> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.iqfareez.flutter_iium_schedule"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application | ||
android:label="IIUM Schedule" | ||
android:icon="@mipmap/ic_launcher"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:launchMode="singleTop" | ||
android:theme="@style/LaunchTheme" | ||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||
android:hardwareAccelerated="true" | ||
android:windowSoftInputMode="adjustResize"> | ||
<!-- Specifies an Android theme to apply to this Activity as soon as | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<queries> | ||
<!-- If your app opens https URLs --> | ||
<intent> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<data android:scheme="https" /> | ||
</intent> | ||
<!-- If your app makes calls --> | ||
<intent> | ||
<action android:name="android.intent.action.DIAL" /> | ||
<data android:scheme="tel" /> | ||
</intent> | ||
<!-- If your sends SMS messages --> | ||
<intent> | ||
<action android:name="android.intent.action.SENDTO" /> | ||
<data android:scheme="smsto" /> | ||
</intent> | ||
<!-- If your app sends emails --> | ||
<intent> | ||
<action android:name="android.intent.action.SEND" /> | ||
<data android:mimeType="*/*" /> | ||
</intent> | ||
</queries> | ||
|
||
<application android:label="IIUM Schedule" android:icon="@mipmap/ic_launcher"> | ||
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> | ||
<!-- Specifies an Android theme to apply to this Activity as soon as | ||
the Android process has started. This theme is visible to the user | ||
while the Flutter UI initializes. After that, this theme continues | ||
to determine the Window background behind the Flutter UI. --> | ||
<meta-data | ||
android:name="io.flutter.embedding.android.NormalTheme" | ||
android:resource="@style/NormalTheme" | ||
/> | ||
<!-- Displays an Android View that continues showing the launch screen | ||
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> | ||
<!-- Displays an Android View that continues showing the launch screen | ||
Drawable until Flutter paints its first frame, then this splash | ||
screen fades out. A splash screen is useful to avoid any visual | ||
gap between the end of Android's launch screen and the painting of | ||
Flutter's first frame. --> | ||
<meta-data | ||
android:name="io.flutter.embedding.android.SplashScreenDrawable" | ||
android:resource="@drawable/launch_background" | ||
/> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<!-- Don't delete the meta-data below. | ||
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<!-- Don't delete the meta-data below. | ||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | ||
<meta-data | ||
android:name="flutterEmbedding" | ||
android:value="2" /> | ||
</application> | ||
<meta-data android:name="flutterEmbedding" android:value="2" /> | ||
</application> | ||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
var table = document.getElementsByClassName("table table-hover")[0]; | ||
var data = table.getElementsByTagName("tr"); | ||
|
||
var nullIndex = new Array(); | ||
var courseCodes = new Array(); | ||
var sections = new Array(); | ||
var combinedSubjectDatas = new Array(); | ||
|
||
// section | ||
for (let i = 1; i < data.length; i++) { | ||
if (data[i].cells[2].firstChild === null) nullIndex.push(i); | ||
else sections.push(parseInt(data[i].cells[2].innerText)); | ||
} | ||
|
||
// course code | ||
for (let i = 1; i < data.length; i++) { | ||
if (!nullIndex.includes(i)) courseCodes.push(data[i].cells[0].innerText); | ||
} | ||
|
||
// combine code & section | ||
for (i = 0; i < sections.length; i++) { | ||
combinedSubjectDatas.push({ courseCode: courseCodes[i], section: sections[i] }); | ||
} | ||
|
||
var json = JSON.stringify(combinedSubjectDatas); | ||
alert("Copy -----> " + json); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_iium_schedule/util/launcher_url.dart'; | ||
import 'package:package_info_plus/package_info_plus.dart'; | ||
import 'package:url_launcher/link.dart'; | ||
|
||
import 'views/course browser/browser.dart'; | ||
import 'views/scheduler/input_course.dart'; | ||
|
||
class MyBody extends StatelessWidget { | ||
const MyBody({ | ||
Key? key, | ||
}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
extendBodyBehindAppBar: true, | ||
appBar: AppBar( | ||
shadowColor: Colors.transparent, | ||
backgroundColor: Colors.transparent, | ||
foregroundColor: Colors.transparent, | ||
actions: [ | ||
PopupMenuButton( | ||
tooltip: "Menu", | ||
onSelected: (value) async { | ||
switch (value) { | ||
case "about": | ||
PackageInfo packageInfo = await PackageInfo.fromPlatform(); | ||
|
||
showAboutDialog( | ||
context: context, | ||
applicationVersion: packageInfo.version, | ||
); | ||
break; | ||
case "github": | ||
LauncherUrl.open("https://github.com/iqfareez/iium_schedule"); | ||
break; | ||
default: | ||
} | ||
}, | ||
icon: const Icon( | ||
Icons.more_vert_outlined, | ||
color: Colors.black87, | ||
), | ||
itemBuilder: (context) => const [ | ||
PopupMenuItem( | ||
child: Text("GitHub"), | ||
value: "github", | ||
), | ||
PopupMenuItem( | ||
child: Text("About"), | ||
value: "about", | ||
), | ||
], | ||
), | ||
], | ||
), | ||
body: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
crossAxisAlignment: CrossAxisAlignment.stretch, | ||
children: [ | ||
MouseRegion( | ||
cursor: SystemMouseCursors.click, | ||
child: CupertinoButton( | ||
child: const Text('Schedule Maker'), | ||
onPressed: () { | ||
Navigator.of(context).push( | ||
CupertinoPageRoute(builder: (_) => const InputCourse())); | ||
}, | ||
), | ||
), | ||
const SizedBox(height: 5), | ||
MouseRegion( | ||
cursor: SystemMouseCursors.click, | ||
child: CupertinoButton( | ||
child: const Text('Browser'), | ||
onPressed: () { | ||
Navigator.of(context) | ||
.push(CupertinoPageRoute(builder: (_) => const Browser())); | ||
}, | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class BasicSubjectModel { | ||
String? courseCode; | ||
int? section; | ||
|
||
BasicSubjectModel({this.courseCode, this.section}); | ||
|
||
BasicSubjectModel.fromJson(Map<String, dynamic> json) { | ||
courseCode = json["courseCode"]; | ||
section = json["section"]; | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
final Map<String, dynamic> data = <String, dynamic>{}; | ||
data["courseCode"] = courseCode; | ||
data["section"] = section; | ||
return data; | ||
} | ||
} |
Oops, something went wrong.