-
Notifications
You must be signed in to change notification settings - Fork 166
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
Migrate project to Null Safety #7
base: master
Are you sure you want to change the base?
Conversation
Andrea, it has been incredibly helpful to have this non-trivial example of migrating to Null Safety to learn from. I really appreciate your doing this for the time_tracker course. I have questions about how dart analysis evaluates some code in email_form_sign_in_stateful_test.dart. For example, in this method...
...this code is marked as dead code:
And both any! arguments give this result in the analysis:
Are these results unavoidable at this time? |
@fogelfish some of the code in the test files is not finalized yet. As I pointed out in this article, there are some problems with mockito and null-safety. You'll notice that some tests have So yeah, don't use my test code as reference as this is not ready just yet. |
@bizz84 maybe use mocktail? It's way more comprehensive when migrating to null safety. |
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 had to change line 36 in the firestore_service.dart file
from:
.map((snapshot) => builder(snapshot.data(), snapshot.id))
to:
.map((snapshot) => builder(snapshot.data() as Map<String, dynamic>, snapshot.id))
In order to build the project. Flutter 2.8.
No description provided.