Skip to content

Commit

Permalink
add assertion of either the initialValue being null, or the text edit…
Browse files Browse the repository at this point in the history
…ing controller being null
  • Loading branch information
aalhamali committed Sep 20, 2018
1 parent b0e4985 commit 63280d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/flutter_typeahead.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ class TypeAheadFormField<T> extends FormField<String> {
AnimationTransitionBuilder transitionBuilder,
Duration animationDuration: const Duration(milliseconds: 500),
double animationStart: 0.25})
: super(
: assert(initialValue == null || textFieldConfiguration.controller == null),
super(
key: key,
onSaved: onSaved,
validator: validator,
Expand Down

0 comments on commit 63280d3

Please sign in to comment.