Skip to content

Commit

Permalink
changed the putentity page and fixed other issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit-Rohila33 committed Oct 23, 2022
1 parent 2b76dac commit c70c2b6
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 17 deletions.
11 changes: 11 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<filteredResources>
<filter>
<id>1666472194349</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
2 changes: 1 addition & 1 deletion android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
arguments=--init-script C\:\\Users\\sp\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.11.0\\config_win\\org.eclipse.osgi\\53\\0\\.cp\\gradle\\init\\init.gradle --init-script C\:\\Users\\sp\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.11.0\\config_win\\org.eclipse.osgi\\53\\0\\.cp\\gradle\\protobuf\\init.gradle
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.4.2))
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
Expand Down
11 changes: 11 additions & 0 deletions android/app/.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<filteredResources>
<filter>
<id>1666472194420</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
6 changes: 4 additions & 2 deletions assets/login/login.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
Expand Down Expand Up @@ -106,10 +107,10 @@
<div class="lowerdiv">
<div class="logindiv">
<a class="login"
href="https://gymkhana.iitb.ac.in/profiles/oauth/authorize/?client_id=MQXcx3EHMqoGW57dXM27j2HSzEpvGAARASXraRmX&response_type=code&scope=basic%20profile%20picture%20sex%20ldap%20phone%20insti_address%20program%20secondary_emails&redirect_uri=https://www.insti.app/login-android.html">
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">
<!-- href="https://gymkhana.iitb.ac.in/profiles/oauth/authorize/?client_id=MQXcx3EHMqoGW57dXM27j2HSzEpvGAARASXraRmX&response_type=code&scope=basic%20profile%20picture%20sex%20ldap%20phone%20insti_address%20program%20secondary_emails&redirect_uri=https://www.insti.app/login-android.html"> -->
<!-- href="https://gymkhana.iitb.ac.in/profiles/oauth/authorize/?client_id=8iPdGfcUEoe6P3IHmQQ63CuPW4glQd1mbsdQtHkW&response_type=code&scope=basic%20profile%20picture%20sex%20ldap%20phone%20insti_address%20program%20secondary_emails&redirect_uri=https://www.insti.app/login-android.html"> -->
<!-- href="https://gymkhana.iitb.ac.in/profiles/oauth/authorize/?client_id=gxzx6u7aw6wco6SJBioORPwum5Sug7OrIPrm8r2W&response_type=code&scope=basic%20profile%20picture%20sex%20ldap%20phone%20insti_address%20program%20secondary_emails&redirect_uri=https://www.insti.app/login-android.html"> -->
<!-- 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"> -->
<!-- href="https://gymkhana.iitb.ac.in/sso/account/login/?next=/sso/oauth/authorize/%3Fclient_id%3Dl3Scj8qKuIRqOg7eaAy54tC8AkEd03Hb9oss8gv7%26response_type%3Dcode%26scope%3Dbasic%2520profile%2520picture%2520sex%2520ldap%2520phone%2520insti_address%2520program%2520secondary_emails%26redirect_uri=https://redirecturi"> -->
LOG IN VIA SSO
</a>
Expand All @@ -128,4 +129,5 @@
</div>
</div>
</body>

</html>
3 changes: 2 additions & 1 deletion lib/src/api/apiclient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ import 'model/offersecret.dart';
part 'apiclient.g.dart';

// @rt.RestApi(baseUrl: "http://192.168.0.102:8000/api")
@rt.RestApi(baseUrl: "http://10.105.177.150/api")
// @rt.RestApi(baseUrl: "http://10.105.177.150/api")
@rt.RestApi(baseUrl: "https://gymkhana.iitb.ac.in/instiapp/api")
abstract class InstiAppApi {
factory InstiAppApi(Dio dio, {String baseUrl}) = _InstiAppApi;

Expand Down
3 changes: 2 additions & 1 deletion lib/src/api/apiclient.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions lib/src/routes/putentitypage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import 'dart:io';

import 'package:InstiApp/src/utils/common_widgets.dart';
// import 'package:InstiApp/src/utils/safe_webview_scaffold.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
// import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:flutter_webview_pro/webview_flutter.dart' as webview;
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';

Expand Down Expand Up @@ -32,7 +33,7 @@ class _PutEntityPageState extends State<PutEntityPage> {
bool hasPermission = false;

StreamSubscription<String>? onUrlChangedSub;
InAppWebViewController? webViewController;
webview.WebViewController? webViewController;

// Storing for dispose
ThemeData? theme;
Expand Down Expand Up @@ -99,13 +100,13 @@ class _PutEntityPageState extends State<PutEntityPage> {
style: theme.textTheme.headline1,
),
)
: InAppWebView(
: webview.WebView(
// javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (controller) {
webViewController = controller;
},
initialUrlRequest: URLRequest(url: Uri.parse(url)),
onLoadStart: (_, url) async {
initialUrl: url,
onPageStarted: (url) async {
// print("Changed URL: $url");
if (url.toString().contains("/event/")) {
var uri = url
Expand All @@ -121,12 +122,12 @@ class _PutEntityPageState extends State<PutEntityPage> {
Navigator.of(context).pushReplacementNamed("/body/$uri");
}
},
androidOnPermissionRequest:
(controller, origin, resources) async {
return PermissionRequestResponse(
resources: resources,
action: PermissionRequestResponseAction.GRANT);
},
// :
// (controller, origin, resources) async {
// return PermissionRequestResponse(
// resources: resources,
// action: PermissionRequestResponseAction.GRANT);
// },
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies:
flutter_webview_pro: ^3.0.1
home_widget: ^0.1.5

flutter_inappwebview: any
# flutter_inappwebview: any
permission_handler: ^8.3.0
qr_flutter: ^4.0.0
intl: ^0.17.0
Expand Down

0 comments on commit c70c2b6

Please sign in to comment.