Skip to content
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

Lot of issues with Flutter 2 Null Satefy #25

Open
SinaArdehali opened this issue Apr 8, 2021 · 6 comments
Open

Lot of issues with Flutter 2 Null Satefy #25

SinaArdehali opened this issue Apr 8, 2021 · 6 comments

Comments

@SinaArdehali
Copy link

Hello,
I am struggling a lot since 1 week, to make the whole code compatible with Flutter null safety and new versions of packages. Can you please make a little video or write a little thing explaining how we can do that ? Thanks a lot Resocoder :-)

@totore86
Copy link

We have figured out with all package updated and with Flutter 2.
We have only one issue with the timestamp in the NoteDto solved by eliminating the timestamp ;)

Some of modification:

  • updated context.bloc to context.read
  • updated all the null safety check
  • updated all required keyword removing the @
  • flushbar and flushbar helper is removed
  • ExtendedNavigator to AutoRouter
  • ...and so on.

P.S.: The timestamp is saved on firebase but when we create/update a note the timestamp from firebase is Null. This generate a NoteFailure.unexpectedError but if we refresh the app in the home all the notes have timestamp and they are created/updated.

@excellencemichel
Copy link

Hi @totore86, can you tell me how do you resolde the error on the todolist item id ? When I attempt to go on note detail, the todoListItem id is null, and I got CastError (Null check operator used on a null value)

@totore86
Copy link

Hi, I have just forked and created the pull request with flutter 2.2.2 and all dependencies at the latest version.

Check it out

@adrianofreires
Copy link

We have figured out with all package updated and with Flutter 2.
We have only one issue with the timestamp in the NoteDto solved by eliminating the timestamp ;)

Some of modification:

  • updated context.bloc to context.read
  • updated all the null safety check
  • updated all required keyword removing the @
  • flushbar and flushbar helper is removed
  • ExtendedNavigator to AutoRouter
  • ...and so on.

P.S.: The timestamp is saved on firebase but when we create/update a note the timestamp from firebase is Null. This generate a NoteFailure.unexpectedError but if we refresh the app in the home all the notes have timestamp and they are created/updated.

Hey man! Thank you! You will save me a lot of hour study. But why you take of the all fields serverTimeStamp?

@Pawelek55
Copy link

Here you will find the solution rrousselGit/freezed#428 (comment)

@alperefesahin
Copy link

Hello all,

I recreate this repository, and asap I will publish it with the changes in the Medium article & YouTube. Stay tuned!

Medium: https://medium.com/@sahinefe
YouTube: https://www.youtube.com/channel/UCcsgi-iDYAtQPmWI7I8e0pg

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

No branches or pull requests

6 participants