kfiross / flutter_mongodb_realm

Unofficial Flutter plugin for using MongoDB Realm services on Android, iOS and web.
Apache License 2.0
41 stars 17 forks source link

Functions are not working in web "collection.find().then((value) {})" and "collection.findOne().then((value) {})" #39

Closed sguru049 closed 1 year ago

sguru049 commented 3 years ago

"collection.find().then((value) {})" and "collection.findOne().then((value) {})" both are returning null otherwise all are working fine in fact in your package "flutter_mongo_stitch_web" its running fine please fix it if possible.

Error: Unexpected null value. at Object.throw_ [as throw] (http://localhost:59435/dart_sdk.js:5041:11) at Object.nullCheck (http://localhost:59435/dart_sdk.js:5366:30) at findDocuments (http://localhost:59435/packages/flutter_mongodb_realm/plugin.dart.lib.js:135:214) at findDocuments.next () at runBody (http://localhost:59435/dart_sdk.js:37422:34) at Object._async [as async] (http://localhost:59435/dart_sdk.js:37453:7) at Function.findDocuments (http://localhost:59435/packages/flutter_mongodb_realm/plugin.dart.lib.js:134:20) at mongo_collection.MongoCollection.new.find (http://localhost:59435/packages/flutter_mongodb_realm/database/mongo_collection.dart.lib.js:214:70) at find.next () at runBody (http://localhost:59435/dart_sdk.js:37422:34) at Object._async [as async] (http://localhost:59435/dart_sdk.js:37453:7) at mongo_collection.MongoCollection.new.find (http://localhost:59435/packages/flutter_mongodb_realm/database/mongo_collection.dart.lib.js:194:20) at http://localhost:59435/packages/realm_demo_project/main.dart.lib.js:229:20 at _RootZone.runUnary (http://localhost:59435/dart_sdk.js:37274:59) at _FutureListener.then.handleValue (http://localhost:59435/dart_sdk.js:32530:29) at handleValueCallback (http://localhost:59435/dart_sdk.js:33057:49) at Function._propagateToListeners (http://localhost:59435/dart_sdk.js:33095:17) at _Future.immediate.[_completeWithValue] (http://localhost:59435/dart_sdk.js:32943:23) at async._AsyncCallbackEntry.new.callback (http://localhost:59435/dart_sdk.js:32964:35) at Object._microtaskLoop (http://localhost:59435/dart_sdk.js:37526:13) at _startMicrotaskLoop (http://localhost:59435/dart_sdk.js:37532:13) at http://localhost:59435/dart_sdk.js:33303:9

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// AND THESE ARE SOME WARNING THAT YOUR PACKAGE IS GIVING WHILE RUNNING ////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    ^

../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mongodb_realm-2.0.0-nullsafety.0/lib/database/mongo_collection.dart:219:9: Warning: Operand of null-aware operation '?.' has type 'Map<String, dynamic>' which excludes null.

../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mongodb_realm-2.0.0-nullsafety.0/lib/database/mongo_collection.dart:247:7: Warning: Operand of null-aware operation '?.' has type 'Map<String, dynamic>' which excludes null.

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

kfiross commented 1 year ago

@sguru049 it was fixed at 2.0.2