Skip to content

Commit

Permalink
Added support for Flutter v1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
danvick committed Aug 5, 2020
1 parent fc3589a commit 9d929cc
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 76 deletions.
10 changes: 2 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
## [1.9.0-dev.3] - 15-Jun-2020
* Added fixes from v1.8.3
## [1.9.0] - 05-Aug-2020
* Added support for Flutter v1.20

## [1.8.3] - 15-Jun-2020
* Fixed bug in checking whether `maxChips` has been reached.
* Fix `setState called on disposed widget`

## [1.9.0-dev.2] - 14-Jun-2020
* Merged in changes from v1.8.2

## [1.8.2] - 14-Jun-2020
* Added `autofocus` feature. Closes #41
* Allow user-entered text to be edited when chip is deleted with keyboard. Closes #38
Expand All @@ -16,9 +13,6 @@
* Fixed bug where when keyboard is dismissed and focus retained, keyboard couldn't come back
* Show overlay above field if more space available. Closes #24

## [1.9.0-dev.1] - 24-Apr-2020
* Fixed bug: `Missing implementations for TextInputClient.currentAutofillScope`. Closes #37

## [1.8.1] - 24-Apr-2020
* Attempt to ensure to ensure field always visible. Closes #25
* Also fixed issue when overlay position doesn't adjust with field height.
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Flutter library for building input fields with InputChips as input options.
### Installation
Follow installation instructions [here](https://pub.dartlang.org/packages/flutter_chips_input#-installing-tab-)

**NOTE:** For anyone on pre-release Flutter channels, kindly prefer the [pre-release versions of the package](https://pub.dev/packages/flutter_chips_input/versions#prerelease).

### Import
```dart
import 'package:flutter_chips_input/flutter_chips_input.dart';
Expand Down
6 changes: 4 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ class _MyHomePageState extends State<MyHomePage> {
),*/
RaisedButton(
child: Text('Add Chip'),
onPressed: (){
_chipKey.currentState.selectSuggestion(AppProfile('Gina', 'fred@flutter.io',
onPressed: () {
_chipKey.currentState.selectSuggestion(AppProfile(
'Gina',
'fred@flutter.io',
'https://upload.wikimedia.org/wikipedia/commons/7/7c/Profile_avatar_placeholder_large.png'));
},
),
Expand Down
10 changes: 5 additions & 5 deletions lib/src/chips_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ChipsInputState<T> extends State<ChipsInput<T>>
StreamController<List<T>> _suggestionsStreamController;
int _searchId = 0;
TextEditingValue _value = TextEditingValue();
TextEditingValue _receivedRemoteTextEditingValue;
// TextEditingValue _receivedRemoteTextEditingValue;
TextInputConnection _textInputConnection;
SuggestionsBoxController _suggestionsBoxController;
LayerLink _layerLink = LayerLink();
Expand All @@ -115,7 +115,7 @@ class ChipsInputState<T> extends State<ChipsInput<T>>
bool get _hasReachedMaxChips =>
widget.maxChips != null && _chips.length >= widget.maxChips;

FocusAttachment _focusAttachment;
// FocusAttachment _focusAttachment;
FocusNode _focusNode;

FocusNode get _effectiveFocusNode =>
Expand All @@ -127,7 +127,7 @@ class ChipsInputState<T> extends State<ChipsInput<T>>
void initState() {
super.initState();
_chips.addAll(widget.initialValue);
_focusAttachment = _effectiveFocusNode.attach(context);
// _focusAttachment = _effectiveFocusNode.attach(context);
_suggestionsBoxController = SuggestionsBoxController(context);
_suggestionsStreamController = StreamController<List<T>>.broadcast();
_effectiveFocusNode.addListener(_handleFocusChanged);
Expand Down Expand Up @@ -285,14 +285,14 @@ class ChipsInputState<T> extends State<ChipsInput<T>>
if (_hasInputConnection) {
_textInputConnection.close();
_textInputConnection = null;
_receivedRemoteTextEditingValue = null;
// _receivedRemoteTextEditingValue = null;
}
}

@override
void updateEditingValue(TextEditingValue value) {
// print("updateEditingValue FIRED with ${value.text}");
_receivedRemoteTextEditingValue = value;
// _receivedRemoteTextEditingValue = value;
var _oldTextEditingValue = _value;
if (value.text != _oldTextEditingValue.text) {
setState(() {
Expand Down
81 changes: 23 additions & 58 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,62 +1,55 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.2"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
collection:
clock:
dependency: transitive
description:
name: collection
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
convert:
version: "1.0.1"
collection:
dependency: transitive
description:
name: convert
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
version: "1.14.13"
fake_async:
dependency: transitive
description:
name: crypto
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "1.1.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -67,20 +60,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
version: "0.12.8"
meta:
dependency: transitive
description:
Expand All @@ -94,21 +80,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "1.7.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -127,7 +99,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -155,27 +127,20 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.15"
version: "0.2.17"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.2.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.1"
sdks:
dart: ">=2.6.0 <3.0.0"
dart: ">=2.9.0-14.0.dev <3.0.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_chips_input
description: Flutter library for building input fields with InputChips as input options.
version: 1.9.0-dev.3
version: 1.9.0
homepage: https://github.com/danvick/flutter_chips_input

environment:
Expand Down

0 comments on commit 9d929cc

Please sign in to comment.