Do not crash when nullable actions is null #236
+6
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Actions was made nullable in d93e351 but that same commit introduced a non-null assertion operator here which means it is valid to create a
KeyboardActionsConfig
with a nullactions
but this will crashKeyboardActions
on init.This PR ensures that a check is made if there are actions on the newConfig and only attempt to iterate over them when they exist. By assigning
newConfig.actions
to a local variable it is implicitly unwrapped once the null check has occurred.The PR also removes the
flutter_export_environment.sh
file from the repo and adds it to the .gitignore file, as this file is not intended to be committed to source control.