I tried accessing a MongoDB database using the mongo_dart in flutter and it gives the following error:
"MongoDart Error: Invalid scheme in uri:" followed by the uri which is of the following form:
mongodb+srv://user:[email protected]/databaseName?options.
The connection string otherwise works when seeing the database on mongodb compass. Any ideas what might be wrong/ different ways I can make the connection?
I faced the same issue when using the Db constructor directly. i.e;
However, when using the Db.create() function (which returns a Db instance), I was able to get it to work with no issues.