fix TypeError: Instance of 'MappedListIterable': type 'MappedListIterable' is not a subtype of type 'FutureOr>'

--- a/lib/services/note_tag_service.dart
+++ b/lib/services/note_tag_service.dart
@@ -9,6 +9,5 @@ class NoteTagService {
   Future<Map<String, int>> getMyTagCloud() async {
     var apiResult = (await _noteTagApi.getMyTagCloud()).data;
     if (!apiResult['successful']) throw ApiException(apiResult);
-    return apiResult['data'].map((item) => {item['tag'] as String: item['count'] as int});
-  }
+    return { for (var item in apiResult['data']) item['tag'] as String : item['count'] as int };  }
+  }

Comments

  1. Markdown is allowed. HTML tags allowed: <strong>, <em>, <blockquote>, <code>, <pre>, <a>.