Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from 4inka/fix_controller_dispose
Browse files Browse the repository at this point in the history
Fix controller dispose issue
  • Loading branch information
4inka authored Dec 14, 2021
2 parents a3423b5 + 2376efd commit 9e69a90
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## 1.2.2 - [14-12-2021]

### Fixed
* Correcting bug in which disposing controller would generate error

## 1.2.1 - [09-12-2021]

### Added
### Fixed
* Correcting bug in which could not set initial value through controller

## 1.2.0 - [09-12-2021]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ In the `pubspec.yaml` of your flutter project, add the following dependency:
``` yaml
dependencies:
...
easy_autocomplete: ^1.2.1
easy_autocomplete: ^1.2.2
```
### Basic example
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.2.1"
version: "1.2.2"
fake_async:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion lib/easy_autocomplete.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class _EasyAutocompleteState extends State<EasyAutocomplete> {
@override
void dispose() {
if (_overlayEntry != null) _overlayEntry!.dispose();
if (widget.controller != null) widget.controller!.dispose();
if (widget.controller == null) _textFormField.controller!.dispose();
if (_debounce != null) _debounce?.cancel();
super.dispose();
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: easy_autocomplete
description: A simple but flexible autocomplete TextFormField to help you display suggestions to your users while typing
version: 1.2.1
version: 1.2.2
homepage: https://github.com/4inka/flutter_easy_autocomplete

environment:
Expand Down

0 comments on commit 9e69a90

Please sign in to comment.