Skip to content

Commit

Permalink
fix merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cedvdb committed Feb 2, 2024
1 parent 823bd7d commit bbe10d8
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions lib/src/widgets/country_selector/search_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,6 @@ class SearchBox extends StatefulWidget {
State<SearchBox> createState() => _SearchBoxState();
}

class _SearchBoxState extends State<SearchBox> {
String _previousValue = '';

@override
void initState() {
super.initState();
}

void handleChange(e) {
widget.onChanged(e);

// detect length difference
final diff = e.length - _previousValue.length;
if (diff > 3) {
// more than 3 characters added, probably a paste / autofill of country name
widget.onSubmitted();
}

setState(() {
_previousValue = e;
});
}

@override
State<SearchBox> createState() => _SearchBoxState();
}

class _SearchBoxState extends State<SearchBox> {
String _previousValue = '';

Expand Down

0 comments on commit bbe10d8

Please sign in to comment.