From 9d929ccfb0174321c80973fdfd95d6977dfd7486 Mon Sep 17 00:00:00 2001 From: Danvick Miller Date: Wed, 5 Aug 2020 21:26:51 +0300 Subject: [PATCH] Added support for Flutter v1.20 --- CHANGELOG.md | 10 +---- README.md | 2 - example/lib/main.dart | 6 ++- lib/src/chips_input.dart | 10 ++--- pubspec.lock | 81 ++++++++++++---------------------------- pubspec.yaml | 2 +- 6 files changed, 35 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 842d6887..6e3be78a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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. diff --git a/README.md b/README.md index 3f38e393..51903e6a 100644 --- a/README.md +++ b/README.md @@ -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'; diff --git a/example/lib/main.dart b/example/lib/main.dart index 3c4730bc..e61479f1 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -201,8 +201,10 @@ class _MyHomePageState extends State { ),*/ 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')); }, ), diff --git a/lib/src/chips_input.dart b/lib/src/chips_input.dart index 09edfd06..1198248e 100644 --- a/lib/src/chips_input.dart +++ b/lib/src/chips_input.dart @@ -92,7 +92,7 @@ class ChipsInputState extends State> StreamController> _suggestionsStreamController; int _searchId = 0; TextEditingValue _value = TextEditingValue(); - TextEditingValue _receivedRemoteTextEditingValue; + // TextEditingValue _receivedRemoteTextEditingValue; TextInputConnection _textInputConnection; SuggestionsBoxController _suggestionsBoxController; LayerLink _layerLink = LayerLink(); @@ -115,7 +115,7 @@ class ChipsInputState extends State> bool get _hasReachedMaxChips => widget.maxChips != null && _chips.length >= widget.maxChips; - FocusAttachment _focusAttachment; + // FocusAttachment _focusAttachment; FocusNode _focusNode; FocusNode get _effectiveFocusNode => @@ -127,7 +127,7 @@ class ChipsInputState extends State> void initState() { super.initState(); _chips.addAll(widget.initialValue); - _focusAttachment = _effectiveFocusNode.attach(context); + // _focusAttachment = _effectiveFocusNode.attach(context); _suggestionsBoxController = SuggestionsBoxController(context); _suggestionsStreamController = StreamController>.broadcast(); _effectiveFocusNode.addListener(_handleFocusChanged); @@ -285,14 +285,14 @@ class ChipsInputState extends State> 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(() { diff --git a/pubspec.lock b/pubspec.lock index 97283e89..9477cdd7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,27 +1,13 @@ # 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: @@ -29,6 +15,13 @@ packages: 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: @@ -36,27 +29,27 @@ packages: 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 @@ -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: @@ -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 @@ -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: @@ -155,14 +127,14 @@ 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: @@ -170,12 +142,5 @@ packages: 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" diff --git a/pubspec.yaml b/pubspec.yaml index f6063933..d5cfa92f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: