-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stricter types with pedantic and fix for #37 #38
base: master
Are you sure you want to change the base?
Conversation
Any plans on merge this to fix #37? |
…try/catch in CacheManager.get() with Reference toMap issue.
I've run into the same thing. For anyone wanting a temporary pubspec.yaml fix to keep going, I've created a fork you may use. You may also fork your own for safety+security. I simply patched in the patch from @Nolence (Thank you!). This also includes an issue I was having with FirebaseImageObject.fromMap and Reference. Rather than find a final solution I've simply thrown in a try/catch and I'm back up and running.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent job! Just needs a couple of things then I'll release it.
@@ -26,7 +27,7 @@ class FirebaseImageCacheManager { | |||
|
|||
Future<void> open() async { | |||
db = await openDatabase( | |||
join((await getDatabasesPath())!, dbName), | |||
join((await getDatabasesPath()), dbName), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the error The argument type 'String?' can't be assigned to the parameter type 'String'.dart(argument_type_not_assignable)
here... Any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's odd, I don't think it returns a nullable string anymore.
Looking at ^2.0.0+3 of sqflite, all their uses of getDatabasesPath
have a return type of Future<String>
This ready to be reviewed again |
This should fix #37
It also removes several force unwraps (!) and moves strong-mode to avoid implicit casts and dynamics.