From b1155e3ea8a3354d62e60bdc01a9f5e5ffb3039d Mon Sep 17 00:00:00 2001 From: li3317 Date: Fri, 5 Mar 2021 22:21:51 -0500 Subject: [PATCH] support flutter 2.0 --- CHANGELOG.md | 13 ++++++- README.md | 13 +------ lib/widgets/editor.dart | 2 +- lib/widgets/{FakeUi.dart => fake_ui.dart} | 0 lib/widgets/{RealUi.dart => real_ui.dart} | 0 lib/widgets/toolbar.dart | 4 +- pubspec.lock | 46 +++++++++++------------ pubspec.yaml | 2 +- 8 files changed, 38 insertions(+), 42 deletions(-) rename lib/widgets/{FakeUi.dart => fake_ui.dart} (100%) rename lib/widgets/{RealUi.dart => real_ui.dart} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f996e40..0e5cb7dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,8 +104,17 @@ ## [0.3.3] * More fix on cursor focus issue when keyboard is on. +## [0.3.4] +* Improve link handling for tel, mailto and etc. + +## [0.3.5] +* Fix for cursor focus issues when keyboard is on. + ## [1.0.0-dev.1] -* Upgrade prerelease SDK & Bump for master +* Upgrade prerelease SDK & Bump for master. ## [1.0.0-dev.2] -* Improve link handling for tel, mailto and etc. \ No newline at end of file +* Improve link handling for tel, mailto and etc. + +## [1.0.0] +* Support flutter 2.0. \ No newline at end of file diff --git a/README.md b/README.md index 848f40c7..3cb37a95 100644 --- a/README.md +++ b/README.md @@ -70,18 +70,7 @@ The `QuillToolbar` class lets you customise which formatting options are availab ## Web -Default branch `master` is on channel `master`. To use channel `stable`, switch to branch `stable`. -Branch `master` on channel `master` supports web. To run the app on web do the following: - -1 - -

-1) Change flutter channel to master using `flutter channel master`, followed by `flutter upgrade`. -2) Enable web using `flutter config --enable-web` and restart the IDE. -3) Upon successful execution of step 1 and 2 you should see `Chrome` as one of the devices which you run `flutter devices`. -4) Run the app. - -For web development, [ReactQuill] is recommended to use for compatibility. +For web development, use `flutter config --enable-web` for flutter and use [ReactQuill] for React. --- diff --git a/lib/widgets/editor.dart b/lib/widgets/editor.dart index b49598bc..d58fb7e4 100644 --- a/lib/widgets/editor.dart +++ b/lib/widgets/editor.dart @@ -24,7 +24,7 @@ import 'package:string_validator/string_validator.dart'; import 'package:universal_html/prefer_universal/html.dart' as html; import 'package:url_launcher/url_launcher.dart'; -import 'FakeUi.dart' if (dart.library.html) 'RealUi.dart' as ui; +import 'fake_ui.dart' if (dart.library.html) 'real_ui.dart' as ui; import 'box.dart'; import 'controller.dart'; import 'cursor.dart'; diff --git a/lib/widgets/FakeUi.dart b/lib/widgets/fake_ui.dart similarity index 100% rename from lib/widgets/FakeUi.dart rename to lib/widgets/fake_ui.dart diff --git a/lib/widgets/RealUi.dart b/lib/widgets/real_ui.dart similarity index 100% rename from lib/widgets/RealUi.dart rename to lib/widgets/real_ui.dart diff --git a/lib/widgets/toolbar.dart b/lib/widgets/toolbar.dart index 921cb91c..96c87933 100644 --- a/lib/widgets/toolbar.dart +++ b/lib/widgets/toolbar.dart @@ -144,7 +144,7 @@ class _LinkDialogState extends State<_LinkDialog> { onChanged: _linkChanged, ), actions: [ - FlatButton( + TextButton( onPressed: _link.isNotEmpty ? _applyLink : null, child: Text('Apply'), ), @@ -512,7 +512,6 @@ class ImageButton extends StatefulWidget { class _ImageButtonState extends State { List _paths; - String _directoryPath; String _extension; final _picker = ImagePicker(); FileType _pickingType = FileType.any; @@ -535,7 +534,6 @@ class _ImageButtonState extends State { Future _pickImageWeb() async { try { - _directoryPath = null; _paths = (await FilePicker.platform.pickFiles( type: _pickingType, allowMultiple: false, diff --git a/pubspec.lock b/pubspec.lock index 75d48e83..59f3c93b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -77,7 +77,7 @@ packages: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "2.1.6" + version: "3.0.0" flutter: dependency: "direct main" description: flutter @@ -89,35 +89,35 @@ packages: name: flutter_colorpicker url: "https://pub.dartlang.org" source: hosted - version: "0.3.5" + version: "0.4.0-nullsafety.0" flutter_keyboard_visibility: dependency: "direct main" description: name: flutter_keyboard_visibility url: "https://pub.dartlang.org" source: hosted - version: "4.0.4" + version: "5.0.0" flutter_keyboard_visibility_platform_interface: dependency: transitive description: name: flutter_keyboard_visibility_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "2.0.0" flutter_keyboard_visibility_web: dependency: transitive description: name: flutter_keyboard_visibility_web url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "2.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -141,28 +141,28 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.2" + version: "0.13.0" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "3.1.4" + version: "4.0.0" image_picker: dependency: "direct main" description: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.6.7+22" + version: "0.7.2" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "2.0.1" js: dependency: transitive description: @@ -211,14 +211,14 @@ packages: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.0.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "3.0.0" quiver_hashcode: dependency: "direct main" description: @@ -237,7 +237,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.0" stack_trace: dependency: transitive description: @@ -265,7 +265,7 @@ packages: name: string_validator url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.2.0-nullsafety.0" term_glyph: dependency: transitive description: @@ -286,7 +286,7 @@ packages: name: tuple url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.0.0-nullsafety.0" typed_data: dependency: transitive description: @@ -314,42 +314,42 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "5.7.10" + version: "6.0.2" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+4" + version: "2.0.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+9" + version: "2.0.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.9" + version: "2.0.2" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.5+3" + version: "2.0.0" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+3" + version: "2.0.0" vector_math: dependency: transitive description: @@ -365,5 +365,5 @@ packages: source: hosted version: "0.1.2" sdks: - dart: ">=2.12.0-0.0 <3.0.0" - flutter: ">=1.22.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=1.24.0-10.2.pre" diff --git a/pubspec.yaml b/pubspec.yaml index 48681f97..68e79da2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: One client and affiliated collaborator of Flutter Quill is Bullet Journal App. -version: 1.0.0-dev.2 +version: 1.0.0 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill.git