Skip to content

Fix null DataList issue + other null-safety concerns#86

Open
pierrea wants to merge 9 commits into
Dn-a:null-safetyfrom
pierrea:null-safety
Open

Fix null DataList issue + other null-safety concerns#86
pierrea wants to merge 9 commits into
Dn-a:null-safetyfrom
pierrea:null-safety

Conversation

@pierrea

@pierrea pierrea commented Oct 5, 2021

Copy link
Copy Markdown

This PR fixes #79 and addresses all the other null-safety warnings.
Version proposed: 1.0.1

@pierrea pierrea changed the title Fix issue null DataList issue + other null-safety concerns Fix null DataList issue + other null-safety concerns Oct 5, 2021
Comment thread lib/src/tags.dart
double _width = 0;

final List<DataList> _list = [];
final List<DataList?> _list = [];

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Here is the fix to #79

@smalburg1

Copy link
Copy Markdown

It worked! Why has this not been merged yet?

@pierrea

pierrea commented Nov 24, 2021

Copy link
Copy Markdown
Author

cc @Dn-a 🙏

@pedrox-hs pedrox-hs left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe some files could be deleted and added to .gitignore. Look an example.

Comment thread example/android/local.properties Outdated
Comment thread example/ios/Flutter/flutter_export_environment.sh Outdated
Comment thread lib/src/item_tags.dart
@@ -438,9 +439,9 @@ class _ItemTagsState extends State<ItemTags> {
void _singleItem(DataListInherited dataSetIn, DataList? dataSet) {
dataSetIn.list!
.where((tg) => tg != null)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To avoid use of !.

Suggested change
.where((tg) => tg != null)
..whereNotNull()

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks but my IDE complains when using whereNotNull, as if it didn't exist...

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

My bad, it is an extension method from the collection package and it is not used in this package, I'm sorry. (and sorry for the very long delay)

Comment thread pubspec.lock Outdated
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.3"
version: "2.8.1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's not recommended commit this file in libraries

Comment thread pubspec.yaml
@pierrea pierrea closed this Jan 25, 2022
@pierrea pierrea reopened this Jan 25, 2022
@tony123S

tony123S commented Mar 8, 2022

Copy link
Copy Markdown

so how do we use this if this has not been merged yet ?!

@pedrox-hs

Copy link
Copy Markdown

so how do we use this if this has not been merged yet ?!

@tony123S, sorry for the delay, I think you already did it, but if anyone needs it too:

flutter pub add flutter_tags --git-url=https://github.com/pierrea/flutter_tags --git-ref=null-safety

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.

4 participants