merged Catch and ignore utf8 format exception in getFavicons()
This commit is contained in:
parent
45ef5c3755
commit
f634c1ed83
|
@ -43,6 +43,7 @@
|
||||||
- Merged "Android - Load client certificate from local storage" [#1241](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1241) (thanks to [akioyamamoto1977](https://github.com/akioyamamoto1977))
|
- Merged "Android - Load client certificate from local storage" [#1241](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1241) (thanks to [akioyamamoto1977](https://github.com/akioyamamoto1977))
|
||||||
- Merged "fix Theme_AppCompat_Dialog_Alert not found" [#1262](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1262) (thanks to [mohenaxiba](https://github.com/mohenaxiba))
|
- Merged "fix Theme_AppCompat_Dialog_Alert not found" [#1262](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1262) (thanks to [mohenaxiba](https://github.com/mohenaxiba))
|
||||||
- Merged "Allow a cookie without a domain to be set on Android" [#1295](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1295) (thanks to [bagedevimo](https://github.com/bagedevimo))
|
- Merged "Allow a cookie without a domain to be set on Android" [#1295](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1295) (thanks to [bagedevimo](https://github.com/bagedevimo))
|
||||||
|
- Merged "Catch and ignore utf8 format exception in getFavicons()" [#1302](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1302) (thanks to [Doflatango](https://github.com/Doflatango))
|
||||||
|
|
||||||
## 5.4.4+3
|
## 5.4.4+3
|
||||||
|
|
||||||
|
|
|
@ -1533,6 +1533,7 @@ class InAppWebViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (manifestFound) {
|
if (manifestFound) {
|
||||||
|
try {
|
||||||
Map<String, dynamic> manifest =
|
Map<String, dynamic> manifest =
|
||||||
json.decode(await manifestResponse!.transform(Utf8Decoder()).join());
|
json.decode(await manifestResponse!.transform(Utf8Decoder()).join());
|
||||||
if (manifest.containsKey("icons")) {
|
if (manifest.containsKey("icons")) {
|
||||||
|
@ -1541,6 +1542,10 @@ class InAppWebViewController {
|
||||||
icon["src"], icon["rel"], icon["sizes"], true));
|
icon["src"], icon["rel"], icon["sizes"], true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} on FormatException catch (_) {
|
||||||
|
/// The [manifestResponse] might not has a valid JSON string, catch and
|
||||||
|
/// ignore the error
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return favicons;
|
return favicons;
|
||||||
|
|
Loading…
Reference in New Issue