diff --git a/.env b/.env
deleted file mode 100644
index b85f7c1b..00000000
--- a/.env
+++ /dev/null
@@ -1 +0,0 @@
-KEY="Enter KEY Here";
\ No newline at end of file
diff --git a/.env.dev b/.env.dev
new file mode 100644
index 00000000..47421656
--- /dev/null
+++ b/.env.dev
@@ -0,0 +1 @@
+KEY="Tolm_fRDkfoN5WMU4oUXWxNwmn1E0MmYlbeh1LA29cU=";
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 457b3325..2aa0acc4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
.history
.svn/
*.env
+.env
.fvm
# IntelliJ related
*.iml
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 35ae2301..a9b024ed 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -31,7 +31,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
// }
android {
- compileSdkVersion 32
+ compileSdkVersion 34
ndkVersion "26.1.10909125"
lintOptions {
@@ -93,8 +93,8 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
implementation 'com.google.firebase:firebase-core:16.0.1'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'
- compile 'com.squareup.retrofit2:retrofit:2.3.0'
- compile 'com.squareup.retrofit2:converter-gson:2.3.0'
+ implementation 'com.squareup.retrofit2:retrofit:2.3.0'
+ implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
// implementation "androidx.work:work-runtime-ktx:2.7.0"
}
diff --git a/android/build.gradle b/android/build.gradle
index b50b6a7c..d2ca44c2 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -2,7 +2,7 @@ buildscript {
ext {
ndkVersion = "26.1.10909125"
}
- ext.kotlin_version = '1.6.10'
+ ext.kotlin_version = '1.8.22'
repositories {
google()
jcenter()
@@ -11,7 +11,7 @@ buildscript {
dependencies {
classpath 'com.google.gms:google-services:4.3.0'
- classpath 'com.android.tools.build:gradle:4.1.0'
+ classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index cfe88f69..302da314 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
\ No newline at end of file
diff --git a/assets/login/login.html b/assets/login/login.html
index bfe6b7d8..be94178d 100644
--- a/assets/login/login.html
+++ b/assets/login/login.html
@@ -131,9 +131,9 @@
id="loginLink"
onclick="showLoading()"
href="https://gymkhana.iitb.ac.in/profiles/oauth/authorize/?client_id=vR1pU7wXWyve1rUkg0fMS6StL1Kr6paoSmRIiLXJ&response_type=code&scope=basic%20profile%20picture%20sex%20ldap%20phone%20insti_address%20program%20secondary_emails&redirect_uri=https://www.insti.app/login-android.html"
- >
-
+ >
+
LOG IN VIA SSO
diff --git a/assets/login/login_dark.html b/assets/login/login_dark.html
index 4371899d..0a3df2e1 100644
--- a/assets/login/login_dark.html
+++ b/assets/login/login_dark.html
@@ -134,10 +134,10 @@
class="login"
onclick="showLoading()"
href="https://gymkhana.iitb.ac.in/profiles/oauth/authorize/?client_id=vR1pU7wXWyve1rUkg0fMS6StL1Kr6paoSmRIiLXJ&response_type=code&scope=basic%20profile%20picture%20sex%20ldap%20phone%20insti_address%20program%20secondary_emails&redirect_uri=https://www.insti.app/login-android.html"
- >
+ >
-
+
LOG IN VIA SSO
diff --git a/ios/Podfile b/ios/Podfile
index 469e02f8..f0009271 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -39,6 +39,12 @@ post_install do |installer|
flutter_additional_ios_build_settings(target)
end
+ ################ Awesome Notifications pod modification ###################
+ awesome_pod_file = File.expand_path(File.join('plugins', 'awesome_notifications', 'ios', 'Scripts', 'AwesomePodFile'), '.symlinks')
+ require awesome_pod_file
+ update_awesome_pod_build_settings(installer)
+ ################ Awesome Notifications pod modification ###################
+
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
@@ -47,3 +53,9 @@ post_install do |installer|
end
end
end
+
+################ Awesome Notifications pod modification ###################
+awesome_pod_file = File.expand_path(File.join('plugins', 'awesome_notifications', 'ios', 'Scripts', 'AwesomePodFile'), '.symlinks')
+require awesome_pod_file
+update_awesome_main_target_settings('Runner', File.dirname(File.realpath(__FILE__)), flutter_root)
+################ Awesome Notifications pod modification ###################
diff --git a/lib/generated_plugin_registrant.dart b/lib/generated_plugin_registrant.dart
deleted file mode 100644
index aba977a9..00000000
--- a/lib/generated_plugin_registrant.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// ignore_for_file: directives_ordering
-// ignore_for_file: lines_longer_than_80_chars
-
-import 'package:camera_web/camera_web.dart';
-import 'package:device_info_plus_web/device_info_plus_web.dart';
-import 'package:firebase_core_web/firebase_core_web.dart';
-import 'package:firebase_messaging_web/firebase_messaging_web.dart';
-import 'package:flutter_keyboard_visibility_web/flutter_keyboard_visibility_web.dart';
-import 'package:flutter_native_timezone/flutter_native_timezone_web.dart';
-import 'package:image_picker_for_web/image_picker_for_web.dart';
-import 'package:location_web/location_web.dart';
-import 'package:package_info_plus_web/package_info_plus_web.dart';
-import 'package:shared_preferences_web/shared_preferences_web.dart';
-import 'package:uni_links_web/uni_links_web.dart';
-import 'package:url_launcher_web/url_launcher_web.dart';
-
-import 'package:flutter_web_plugins/flutter_web_plugins.dart';
-
-// ignore: public_member_api_docs
-void registerPlugins(Registrar registrar) {
- CameraPlugin.registerWith(registrar);
- DeviceInfoPlusPlugin.registerWith(registrar);
- FirebaseCoreWeb.registerWith(registrar);
- FirebaseMessagingWeb.registerWith(registrar);
- FlutterKeyboardVisibilityPlugin.registerWith(registrar);
- FlutterNativeTimezonePlugin.registerWith(registrar);
- ImagePickerPlugin.registerWith(registrar);
- LocationWebPlugin.registerWith(registrar);
- PackageInfoPlugin.registerWith(registrar);
- SharedPreferencesPlugin.registerWith(registrar);
- UniLinksPlugin.registerWith(registrar);
- UrlLauncherPlugin.registerWith(registrar);
- registrar.registerMessageHandler();
-}
diff --git a/lib/main.dart b/lib/main.dart
index 60973a7f..3e706bb2 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -113,13 +113,13 @@ class MyAppState extends State with WidgetsBindingObserver {
initAppLinksState();
}
- WidgetsBinding.instance?.addObserver(this);
+ WidgetsBinding.instance.addObserver(this);
}
@override
void dispose() async {
_appLinksSub.cancel();
- WidgetsBinding.instance?.removeObserver(this);
+ WidgetsBinding.instance.removeObserver(this);
disposeNotification();
super.dispose();
}
@@ -163,13 +163,10 @@ class MyAppState extends State with WidgetsBindingObserver {
primaryContainer: widget.bloc.primaryColor[200],
secondaryContainer: widget.bloc.accentColor[200],
brightness: widget.bloc.brightness.toBrightness(),
- onBackground: widget.bloc.brightness == AppBrightness.light
- ? Colors.black
- : Colors.white,
surface: widget.bloc.brightness == AppBrightness.light
? Colors.white
: widget.bloc.brightness.toColor(),
- surfaceVariant: widget.bloc.brightness == AppBrightness.light
+ surfaceContainerHighest: widget.bloc.brightness == AppBrightness.light
? Color(0xFFE8ECF2)
: Color(0xFF121212),
onSurface: widget.bloc.brightness == AppBrightness.light
@@ -184,38 +181,57 @@ class MyAppState extends State with WidgetsBindingObserver {
),
primarySwatch: Colors.primaries.firstWhereOrNull(
(c) => c.value == widget.bloc.accentColor.value),
-
- toggleableActiveColor: widget.bloc.accentColor,
textSelectionTheme:
TextSelectionThemeData(selectionColor: widget.bloc.accentColor),
canvasColor: widget.bloc.brightness.toColor(),
-
- bottomAppBarColor: widget.bloc.primaryColor,
brightness: widget.bloc.brightness.toBrightness(),
textTheme: TextTheme(
- headline4: TextStyle(
+ headlineMedium: TextStyle(
color: widget.bloc.brightness == AppBrightness.light
? Colors.black
: Colors.white,
),
- headline3: TextStyle(
+ displaySmall: TextStyle(
color: widget.bloc.brightness == AppBrightness.light
? Colors.black
: Colors.white,
),
- headline2: TextStyle(
+ displayMedium: TextStyle(
color: widget.bloc.brightness == AppBrightness.light
? Colors.black
: Colors.white,
),
- headline1: TextStyle(
+ displayLarge: TextStyle(
color: widget.bloc.brightness == AppBrightness.light
? Colors.black
: Colors.white,
),
- headline5: TextStyle()),
+ headlineSmall: TextStyle()), checkboxTheme: CheckboxThemeData(
+ fillColor: WidgetStateProperty.resolveWith((Set states) {
+ if (states.contains(WidgetState.disabled)) { return null; }
+ if (states.contains(WidgetState.selected)) { return widget.bloc.accentColor; }
+ return null;
+ }),
+ ), radioTheme: RadioThemeData(
+ fillColor: WidgetStateProperty.resolveWith((Set states) {
+ if (states.contains(WidgetState.disabled)) { return null; }
+ if (states.contains(WidgetState.selected)) { return widget.bloc.accentColor; }
+ return null;
+ }),
+ ), switchTheme: SwitchThemeData(
+ thumbColor: WidgetStateProperty.resolveWith((Set states) {
+ if (states.contains(WidgetState.disabled)) { return null; }
+ if (states.contains(WidgetState.selected)) { return widget.bloc.accentColor; }
+ return null;
+ }),
+ trackColor: WidgetStateProperty.resolveWith((Set states) {
+ if (states.contains(WidgetState.disabled)) { return null; }
+ if (states.contains(WidgetState.selected)) { return widget.bloc.accentColor; }
+ return null;
+ }),
+ ), bottomAppBarTheme: BottomAppBarTheme(color: widget.bloc.primaryColor),
),
onGenerateRoute: (RouteSettings settings) {
// print(settings.name);
diff --git a/lib/src/api/apiclient.dart b/lib/src/api/apiclient.dart
index ed5a2fe9..b19f8583 100644
--- a/lib/src/api/apiclient.dart
+++ b/lib/src/api/apiclient.dart
@@ -46,7 +46,7 @@ import 'model/offersecret.dart';
part 'apiclient.g.dart';
// @rt.RestApi(baseUrl: "http://127.0.0.1:8000/api")
-// @rt.RestApi(baseUrl: "http://10.105.177.150/api")
+// @rt.RestApi(baseUrl: "http://10.198.49.150/api")
@rt.RestApi(baseUrl: "https://gymkhana.iitb.ac.in/instiapp/api")
// @rt.RestApi(baseUrl: "https://dcae-2405-201-5004-30e9-a45d-9897-ea81-3414.ngrok-free.app/api")
abstract class InstiAppApi {
diff --git a/lib/src/api/apiclient.g.dart b/lib/src/api/apiclient.g.dart
index a74f2b7d..a21985ed 100644
--- a/lib/src/api/apiclient.g.dart
+++ b/lib/src/api/apiclient.g.dart
@@ -6,9 +6,15 @@ part of 'apiclient.dart';
// RetrofitGenerator
// **************************************************************************
+// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers
+
class _InstiAppApi implements InstiAppApi {
- _InstiAppApi(this._dio, {this.baseUrl}) {
+ _InstiAppApi(
+ this._dio, {
+ this.baseUrl,
+ }) {
baseUrl ??= 'https://gymkhana.iitb.ac.in/instiapp/api';
+ // baseUrl ??= 'http://10.198.49.150/api';
}
final Dio _dio;
@@ -20,13 +26,24 @@ class _InstiAppApi implements InstiAppApi {
const _extra = {};
final queryParameters = {};
final _headers = {};
- final _data = {};
- final _result = await _dio.fetch>(
- _setStreamType>(
- Options(method: 'GET', headers: _headers, extra: _extra)
- .compose(_dio.options, '/mess',
- queryParameters: queryParameters, data: _data)
- .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl)));
+ final Map? _data = null;
+ final _result =
+ await _dio.fetch>(_setStreamType>(Options(
+ method: 'GET',
+ headers: _headers,
+ extra: _extra,
+ )
+ .compose(
+ _dio.options,
+ '/mess',
+ queryParameters: queryParameters,
+ data: _data,
+ )
+ .copyWith(
+ baseUrl: _combineBaseUrls(
+ _dio.options.baseUrl,
+ baseUrl,
+ ))));
var value = _result.data!
.map((dynamic i) => Hostel.fromJson(i as Map))
.toList();
@@ -34,126 +51,226 @@ class _InstiAppApi implements InstiAppApi {
}
@override
- Future passwordLogin(username, password) async {
+ Future passwordLogin(
+ String username,
+ String password,
+ ) async {
const _extra = {};
final queryParameters = {
r'username': username,
- r'password': password
+ r'password': password,
};
final _headers = {};
- final _data = {};
- final _result = await _dio.fetch