Przeglądaj źródła

Merge pull request #93 from jngbng/master

handle type error in getCookies
Hadrien Lejard 7 lat temu
rodzic
commit
fa774c3d09
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      lib/src/base.dart

+ 2 - 2
lib/src/base.dart

@@ -155,9 +155,9 @@ class FlutterWebviewPlugin {
     _instance = null;
   }
 
-  Future<Map<String, dynamic>> getCookies() async {
+  Future<Map<String, String>> getCookies() async {
     final cookiesString = await evalJavascript("document.cookie");
-    final cookies = {};
+    final cookies = <String, String>{};
 
     if (cookiesString?.isNotEmpty == true) {
       cookiesString.split(";").forEach((String cookie) {