Skip to content

Migrated to Sound Null Safety - #375

Merged
renancaraujo merged 3 commits into
bluefireteam:masterfrom
DevNico:master
Mar 7, 2021
Merged

renancaraujo merged 3 commits into
bluefireteam:masterfrom
DevNico:master

Conversation

@DevNico

@DevNico DevNico commented Nov 21, 2020

Copy link
Copy Markdown
Contributor

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

Comment thread .vscode/settings.json
@nohli

nohli commented Jan 28, 2021

Copy link
Copy Markdown

@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

DevNico commented Jan 28, 2021

Copy link
Copy Markdown
Contributor Author

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

@DevNico

DevNico commented Feb 1, 2021

Copy link
Copy Markdown
Contributor Author

Should be ready for review now.

@nilsreichardt

Copy link
Copy Markdown

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

@dvaldivia

Copy link
Copy Markdown

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

@SergeShkurko SergeShkurko left a comment

Copy link
Copy Markdown
Contributor

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?

Comment thread lib/src/photo_view_wrappers.dart Outdated
Widget _buildLoading(BuildContext context) {
if (widget.loadingBuilder != null) {
return widget.loadingBuilder(context, _imageChunkEvent);
return widget.loadingBuilder!(context, _imageChunkEvent!);

@SergeShkurko SergeShkurko Mar 5, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

fzyzcjy commented Mar 6, 2021

Copy link
Copy Markdown

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

@renancaraujo

Copy link
Copy Markdown
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