-
Notifications
You must be signed in to change notification settings - Fork 547
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
Conversation
@DevNico |
Alright haven't had much time recently due to work / exams. Will look at this again end of next week. |
Should be ready for review now. |
This PR is even more relevant with Flutter 2, anything I can help you test? |
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.
Maybe remove not-null operator from _imageChunkEvent
?
lib/src/photo_view_wrappers.dart
Outdated
@@ -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!); |
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 got a non critical problem when use PhotoViewGallery.builder
(console spam, but works normally)
═══════ 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
...
════════════════════════════════════════════════════════════════════════════════
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 removed it must have overlooked that.
This is very helpful PR! Is there anything I can help? |
Thank you so much for this contribution and sorry for the dalay! |
* Migrated to Sound Null Safety * Null safety migration * Removed incorrect notnull operator
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