Skip to content

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

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

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

Conversation

@pierrea
Copy link

@pierrea pierrea commented Oct 5, 2021

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
double _width = 0;

final List<DataList> _list = [];
final List<DataList?> _list = [];
Copy link
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

It worked! Why has this not been merged yet?

@pierrea
Copy link
Author

pierrea commented Nov 24, 2021

cc @Dn-a 🙏

Copy link

@pedrox-hs pedrox-hs left a comment

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.

@@ -438,9 +439,9 @@ class _ItemTagsState extends State<ItemTags> {
void _singleItem(DataListInherited dataSetIn, DataList? dataSet) {
dataSetIn.list!
.where((tg) => tg != null)

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
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...

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)

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

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

@pierrea pierrea closed this Jan 25, 2022
@pierrea pierrea reopened this Jan 25, 2022
@tony123S
Copy link

tony123S commented Mar 8, 2022

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

@pedrox-hs
Copy link

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