Skip to content

Commit

Permalink
feat: update dependency (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmeng93 authored Jul 25, 2024
1 parent 1ce4a43 commit fbfc5c7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 26 deletions.
41 changes: 17 additions & 24 deletions lib/src/casdoor_flutter_sdk_mobile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,14 @@ class _FullScreenAuthPageState extends State<FullScreenAuthPage> {
return Stack(
children: [
InAppWebView(
initialUrlRequest: URLRequest(url: Uri.parse(widget.params.url)),
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
userAgent:
"Mozilla/5.0 (Android 14; Mobile; rv:123.0) Gecko/123.0 Firefox/123.0",
clearCache: widget.params.clearCache!,
useShouldOverrideUrlLoading: true,
useOnLoadResource: true,
),
initialUrlRequest:
URLRequest(url: WebUri.uri(Uri.parse(widget.params.url))),
initialSettings: InAppWebViewSettings(
userAgent:
"Mozilla/5.0 (Android 14; Mobile; rv:123.0) Gecko/123.0 Firefox/123.0",
clearCache: widget.params.clearCache!,
useShouldOverrideUrlLoading: true,
useOnLoadResource: true,
),
shouldOverrideUrlLoading: (controller, navigationAction) async {
final uri = navigationAction.request.url!;
Expand Down Expand Up @@ -207,25 +206,19 @@ class CasdoorFlutterSdkMobile extends CasdoorFlutterSdkPlatform {
});

await browser.openUrlRequest(
urlRequest: URLRequest(url: Uri.parse(params.url)),
options: InAppBrowserClassOptions(
inAppWebViewGroupOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
userAgent:
"Mozilla/5.0 (Android 14; Mobile; rv:123.0) Gecko/123.0 Firefox/123.0",
clearCache: params.clearCache!,
useOnLoadResource: true,
useShouldOverrideUrlLoading: true,
),
urlRequest: URLRequest(url: WebUri.uri(Uri.parse(params.url))),
settings: InAppBrowserClassSettings(
webViewSettings: InAppWebViewSettings(
userAgent:
"Mozilla/5.0 (Android 14; Mobile; rv:123.0) Gecko/123.0 Firefox/123.0",
clearCache: params.clearCache!,
useOnLoadResource: true,
useShouldOverrideUrlLoading: true,
),
crossPlatform: InAppBrowserOptions(
browserSettings: InAppBrowserSettings(
hideUrlBar: true,
toolbarTopBackgroundColor: Colors.grey.shade300,
),
android: AndroidInAppBrowserOptions(
toolbarTopFixedTitle: 'Login',
),
ios: IOSInAppBrowserOptions(
hideToolbarBottom: true,
),
),
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ dependencies:
path: ^1.8.2
path_provider: ^2.1.1
desktop_webview_window: ^0.2.3
flutter_inappwebview: ^5.8.0
http: '>=0.13.4 <1.0.0'
flutter_inappwebview: ^6.0.0
http: ^1.0.0
crypto: ^3.0.2
jwt_decoder: ^2.0.1

Expand Down

0 comments on commit fbfc5c7

Please sign in to comment.