Skip to content

Commit

Permalink
🔖 Pre release 1.0.0-pre.3+3
Browse files Browse the repository at this point in the history
yea
  • Loading branch information
iqfareez committed Dec 5, 2021
1 parent 8761d0d commit e57fd3a
Show file tree
Hide file tree
Showing 24 changed files with 1,529 additions and 218 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ app.*.map.json
/android/app/profile
/android/app/release
.firebase/hosting.YnVpbGRcd2Vi.cache
cmd.txt
cubacuba.dart
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ linter:
# producing the lint.
rules:
avoid_print: false # Uncomment to disable the `avoid_print` rule
prefer_relative_imports: true
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
74 changes: 40 additions & 34 deletions android/app/src/main/AndroidManifest.xml
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>
Binary file added assets/icons/file-dynamic-clay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/wifi-dynamic-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo/app-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions imaalum-json-script.js
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);
88 changes: 88 additions & 0 deletions lib/body.dart
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()));
},
),
),
],
),
);
}
}
115 changes: 0 additions & 115 deletions lib/browser.dart

This file was deleted.

10 changes: 4 additions & 6 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// 🐦 Flutter imports:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

// 🌎 Project imports:
import 'package:flutter_iium_schedule/browser.dart';
import 'body.dart';

void main() {
runApp(const MyApp());
Expand All @@ -15,12 +14,11 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'IIUM Schedule (Preview)',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.purple,
),
home: const Scaffold(
body: Browser(),
),
home: const MyBody(),
);
}
}
18 changes: 18 additions & 0 deletions lib/model/basic_subject_model.dart
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;
}
}
Loading

0 comments on commit e57fd3a

Please sign in to comment.