Skip to content

Commit

Permalink
Fix returning null on suggestionsCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
KaYBlitZ committed May 15, 2019
1 parent 85f9232 commit 8a9c511
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/flutter_typeahead.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ class _SuggestionsListState<T> extends State<_SuggestionsList<T>>
// if it wasn't removed in the meantime
setState(() {
double animationStart = widget.animationStart;
if (error != null || suggestions.length == 0) {
if (error != null || suggestions == null || suggestions.length == 0) {
animationStart = 1.0;
}
this._animationController.forward(from: animationStart);
Expand Down

0 comments on commit 8a9c511

Please sign in to comment.