Skip to content

Commit ce07366

Browse files
authored
fix: link open error (#547)
1 parent 36d7a7c commit ce07366

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/app/modules/notices/presentation/widgets/notice_body.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'dart:async';
22
import 'dart:collection';
33
import 'dart:convert';
4-
import 'dart:io';
54

65
import 'package:flutter/material.dart';
76
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
@@ -19,7 +18,6 @@ class NoticeBody extends StatefulWidget {
1918

2019
class _NoticeBodyState extends State<NoticeBody> {
2120
double _height = 1;
22-
late bool _initial = Platform.isIOS;
2321
final _completer = Completer<void>();
2422
late final InAppWebViewController _controller;
2523

@@ -48,8 +46,7 @@ class _NoticeBodyState extends State<NoticeBody> {
4846
builtInZoomControls: false,
4947
),
5048
shouldOverrideUrlLoading: (controller, navigationAction) async {
51-
if (_initial) {
52-
_initial = false;
49+
if (navigationAction.request.url.toString() == 'about:blank') {
5350
return NavigationActionPolicy.ALLOW;
5451
}
5552
final uri = navigationAction.request.url;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ziggle
22
description: ziggle
33
publish_to: 'none'
4-
version: 4.1.7
4+
version: 4.1.8
55

66
environment:
77
sdk: ^3.5.1

0 commit comments

Comments
 (0)