-
Notifications
You must be signed in to change notification settings - Fork 103
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 bugs generated by _steps null in discoverFeatures and _alreadyCompletedSteps methods #42
base: master
Are you sure you want to change the base?
Conversation
Conflicting files |
Is this pr stopped? |
This file shouldn't even be in VCS. |
@ayalma will you merge this PR anytime soon? Your package is unusable without addressing this issue. |
lib/src/foundation/bloc.dart
Outdated
@@ -110,7 +110,7 @@ class Bloc { | |||
|
|||
_steps = steps; | |||
_stepsToIgnore = await _alreadyCompletedSteps; | |||
_steps = _steps.where((s) => !_stepsToIgnore.contains(s)).toList(); | |||
_steps = _steps!=null?_steps.where((s) => !_stepsToIgnore.contains(s)).toList():[]; |
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.
What's your problem with spacing? :)
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 don't know what is the problem, the log error is:
lib/src/foundation/bloc.dart
lib/src/rendering/custom_layout.dart
test/feature_discovery_test.dart
Formatting failed: 1
Error: Process completed with exit code 1.
You should run |
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 have run flutter format
lib/src/foundation/bloc.dart
Outdated
_steps = _steps.where((s) => !_stepsToIgnore.contains(s)).toList(); | ||
_steps = _steps != null | ||
? _steps.where((s) => !_stepsToIgnore.contains(s)).toList() | ||
: []; |
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.
This could be rewritten nicely like so:
_steps = _steps?.where((s) => !_stepsToIgnore.contains(s)).toList() ?? [];
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.
same problem :(
lib/src/foundation/bloc.dart
Outdated
? _steps | ||
.where((s) => prefs.getBool('$sharedPrefsPrefix$s') == true) | ||
.toSet() | ||
: {}; |
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.
Same here:
return _steps?.where((s) => prefs.getBool('$sharedPrefsPrefix$s') == true).toSet() ?? {};
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.
same problem :(
One test is still failing because of formatting, maybe run it again. |
Can we please merge this PR? A small linting issue is making this great library unusable. |
Will this PR be waiting? |
fix bugs generated by _steps null in discoverFeatures and _alreadyCompletedSteps methods