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

Migrated to Sound Null Safety #375

Merged
merged 3 commits into from
Mar 7, 2021
Merged

Conversation

DevNico
Copy link
Contributor

@DevNico DevNico commented Nov 21, 2020

As mentioned in #374 this is my PR for the migration to Sound Null Safety. All tests pass but the example will not run in sound null safety mode until flutter_svg is migrated. I opened an issue about migration there as well.

Closes #374

@nohli
Copy link

nohli commented Jan 28, 2021

@DevNico
FYI The mentioned issue is closed and there is a nullsafe flutter_svg prerelease: https://pub.dev/packages/flutter_svg/versions/0.20.0-nullsafety.3

@DevNico
Copy link
Contributor Author

DevNico commented Jan 28, 2021

Alright haven't had much time recently due to work / exams. Will look at this again end of next week.

@DevNico
Copy link
Contributor Author

DevNico commented Feb 1, 2021

Should be ready for review now.

@nilsreichardt
Copy link

@DevNico You can add 'Closes #374' to your PR description. This will automatically close the issue when this PR is merged :)

@dvaldivia
Copy link

This PR is even more relevant with Flutter 2, anything I can help you test?

Copy link
Contributor

@SergeShkurko SergeShkurko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove not-null operator from _imageChunkEvent?

@@ -191,7 +189,7 @@ class _ImageWrapperState extends State<ImageWrapper> {

Widget _buildLoading(BuildContext context) {
if (widget.loadingBuilder != null) {
return widget.loadingBuilder(context, _imageChunkEvent);
return widget.loadingBuilder!(context, _imageChunkEvent!);
Copy link
Contributor

@SergeShkurko SergeShkurko Mar 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i got a non critical problem when use PhotoViewGallery.builder (console spam, but works normally)

image

═══════ Exception caught by widgets library ═══════════════════════════════════
The following _CastError was thrown building ImageWrapper(dirty, state: _ImageWrapperState#640ea):
Null check operator used on a null value

The relevant error-causing widget was
PdfView
lib/main.dart:79
When the exception was thrown, this was the stack
#0      _ImageWrapperState._buildLoading
package:photo_view/src/photo_view_wrappers.dart:192
#1      _ImageWrapperState.build
package:photo_view/src/photo_view_wrappers.dart:155
#2      StatefulElement.build
package:flutter/…/widgets/framework.dart:4612
#3      ComponentElement.performRebuild
package:flutter/…/widgets/framework.dart:4495
#4      StatefulElement.performRebuild
package:flutter/…/widgets/framework.dart:4667
...
════════════════════════════════════════════════════════════════════════════════

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it must have overlooked that.

@fzyzcjy
Copy link

fzyzcjy commented Mar 6, 2021

This is very helpful PR! Is there anything I can help?

@renancaraujo
Copy link
Member

Thank you so much for this contribution and sorry for the dalay!

@renancaraujo renancaraujo merged commit fbf2f92 into bluefireteam:master Mar 7, 2021
sidlatau pushed a commit to sidlatau/photo_view that referenced this pull request Apr 6, 2021
* Migrated to Sound Null Safety

* Null safety migration

* Removed incorrect notnull operator
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.

Null Safety
7 participants