Skip to content

Commit

Permalink
Merge pull request #251 from humhub/f-inforisque-11
Browse files Browse the repository at this point in the history
Update auth_in_app_browser.dart
  • Loading branch information
marc-farre authored Nov 1, 2024
2 parents 80a4650 + acca34b commit 2d8134f
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions lib/util/auth_in_app_browser.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:humhub/models/manifest.dart';
import 'package:humhub/util/extensions.dart';
import 'package:loggy/loggy.dart';

import 'extensions.dart';

class AuthInAppBrowser extends InAppBrowser {
final Manifest manifest;
late InAppBrowserClassSettings settings;
Expand All @@ -14,16 +16,17 @@ class AuthInAppBrowser extends InAppBrowser {
AuthInAppBrowser({required this.manifest, required this.concludeAuth}) {
settings = InAppBrowserClassSettings(
browserSettings: InAppBrowserSettings(
hideUrlBar: true,
shouldCloseOnBackButtonPressed: true,
toolbarTopBackgroundColor: HexColor(manifest.themeColor),
toolbarTopTintColor: HexColor(manifest.themeColor),
presentationStyle: ModalPresentationStyle.OVER_FULL_SCREEN),
hideUrlBar: true,
shouldCloseOnBackButtonPressed: true,
toolbarTopBackgroundColor: Colors.white,
toolbarTopTintColor: HexColor(manifest.themeColor),
presentationStyle: ModalPresentationStyle.PAGE_SHEET,
),
webViewSettings: InAppWebViewSettings(
javaScriptEnabled: true,
useShouldOverrideUrlLoading: true,
userAgent: userAgent,
applicationNameForUserAgent: 'HumHub-Mobile'),
javaScriptEnabled: true,
useShouldOverrideUrlLoading: true,
userAgent: userAgent,
),
);
}

Expand Down

0 comments on commit 2d8134f

Please sign in to comment.