Skip to content

Conversation

@stargazing-dino
Copy link
Contributor

@stargazing-dino stargazing-dino commented Mar 25, 2021

This should fix #37

It also removes several force unwraps (!) and moves strong-mode to avoid implicit casts and dynamics.

@stargazing-dino stargazing-dino changed the title Stricter types with pedantic and fix for #39 Stricter types with pedantic and fix for #37 Mar 25, 2021
@poqueque
Copy link

Any plans on merge this to fix #37?

jessejajit added a commit to jessejajit/firebase_image that referenced this pull request Apr 29, 2021
…try/catch in CacheManager.get() with Reference toMap issue.
@jessejajit
Copy link

jessejajit commented Apr 29, 2021

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.

#  firebase_image: ^1.0.1
  firebase_image:
    git:
      url: git://github.com/blinkin/firebase_image.git
      ref: issue37_fix

Copy link
Owner

@mattreid1 mattreid1 left a 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.

Future<void> open() async {
db = await openDatabase(
join((await getDatabasesPath())!, dbName),
join((await getDatabasesPath()), dbName),
Copy link
Owner

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?

Copy link
Contributor Author

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>

@stargazing-dino
Copy link
Contributor Author

This ready to be reviewed again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning: Operand of null-aware operation '!' has type 'String' which excludes null.

4 participants