Skip to content

Commit bad4b0a

Browse files
committed
handle type error in getCookies
from dart2, getCookies throws type conversion error. Refer to https://stackoverflow.com/questions/49824167/breaking-exception-internallinkedhashmapdynamic-dynamic-is-not-a-subtype-o
1 parent 982ee97 commit bad4b0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/base.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class FlutterWebviewPlugin {
143143

144144
Future<Map<String, dynamic>> getCookies() async {
145145
final cookiesString = await evalJavascript("document.cookie");
146-
final cookies = {};
146+
final cookies = <String, dynamic>{};
147147

148148
if (cookiesString?.isNotEmpty == true) {
149149
cookiesString.split(";").forEach((String cookie) {

0 commit comments

Comments
 (0)