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

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

Open
wants to merge 9 commits into
base: null-safety
Choose a base branch
from

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
@@ -87,9 +82,9 @@ class TagsState extends State<Tags> {
Orientation _orientation = Orientation.portrait;
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.

example/android/local.properties Outdated Show resolved Hide resolved
example/ios/Flutter/flutter_export_environment.sh Outdated Show resolved Hide resolved
@@ -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
@@ -7,49 +7,49 @@ packages:
name: async
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

pubspec.yaml Show resolved Hide resolved
@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.

None yet

4 participants