From 6614030ae571e63ff2bec9f64ba0630eae006c9f Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Sun, 7 May 2023 16:34:21 +0100 Subject: [PATCH 1/5] Fix direction of toolbar dividers (#1202) --- CHANGELOG.md | 3 +++ flutter_quill_extensions/pubspec.yaml | 2 +- lib/src/widgets/toolbar.dart | 25 ++++++++++--------------- pubspec.yaml | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e97089e9..76c289ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [7.1.15] +- Fixed a bug introduced in 7.1.7 where each section in `QuillToolbar` was displayed on its own line. + # [7.1.14] - Add indents change for multiline selection. diff --git a/flutter_quill_extensions/pubspec.yaml b/flutter_quill_extensions/pubspec.yaml index 12ab6b52..a2f9129a 100644 --- a/flutter_quill_extensions/pubspec.yaml +++ b/flutter_quill_extensions/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - flutter_quill: ^7.1.12 + flutter_quill: ^7.1.15 image_picker: ^0.8.5+3 photo_view: ^0.14.0 diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index e4da8149..c8a534c6 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -409,7 +409,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { isButtonGroupShown[3] || isButtonGroupShown[4] || isButtonGroupShown[5])) - AxisDivider(axis, + _AxisDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showAlignmentButtons) SelectAlignmentButton( @@ -445,7 +445,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { isButtonGroupShown[3] || isButtonGroupShown[4] || isButtonGroupShown[5])) - AxisDivider(axis, + _AxisDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showHeaderStyle) SelectHeaderStyleButton( @@ -462,7 +462,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { (isButtonGroupShown[3] || isButtonGroupShown[4] || isButtonGroupShown[5])) - AxisDivider(axis, + _AxisDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showListNumbers) ToggleStyleButton( @@ -507,7 +507,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { if (showDividers && isButtonGroupShown[3] && (isButtonGroupShown[4] || isButtonGroupShown[5])) - AxisDivider(axis, + _AxisDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showQuote) ToggleStyleButton( @@ -540,7 +540,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { afterButtonPressed: afterButtonPressed, ), if (showDividers && isButtonGroupShown[4] && isButtonGroupShown[5]) - AxisDivider(axis, + _AxisDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showLink) LinkStyleButton( @@ -563,7 +563,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { ), if (customButtons.isNotEmpty) if (showDividers) - AxisDivider(axis, + _AxisDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), for (var customButton in customButtons) QuillIconButton( @@ -643,27 +643,22 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { } } -class AxisDivider extends StatelessWidget { - const AxisDivider( +class _AxisDivider extends StatelessWidget { + const _AxisDivider( this.axis, { Key? key, this.color, this.space, }) : super(key: key); - const AxisDivider.horizontal({Color? color, double? space}) - : this(Axis.horizontal, color: color, space: space); - - const AxisDivider.vertical({Color? color, double? space}) - : this(Axis.vertical, color: color, space: space); - final Axis axis; final Color? color; final double? space; @override Widget build(BuildContext context) { - return axis == Axis.horizontal + // Vertical toolbar requires horizontal divider, and vice versa + return axis == Axis.vertical ? Divider( height: space, color: color, diff --git a/pubspec.yaml b/pubspec.yaml index 43a4ec74..b76d6bd0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 7.1.14 +version: 7.1.15 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill From ccdb88fb9acac91b51f187c9f35f5c1da6f8d1f7 Mon Sep 17 00:00:00 2001 From: jiangchong Date: Mon, 8 May 2023 18:46:08 +0800 Subject: [PATCH 2/5] Fix subscript (#1204) --- CHANGELOG.md | 3 +++ flutter_quill_extensions/pubspec.yaml | 2 +- lib/src/models/documents/attribute.dart | 2 +- pubspec.yaml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76c289ec..f51ff476 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [7.1.16] +- Fixed subscript key from 'sup' to 'sub'. + # [7.1.15] - Fixed a bug introduced in 7.1.7 where each section in `QuillToolbar` was displayed on its own line. diff --git a/flutter_quill_extensions/pubspec.yaml b/flutter_quill_extensions/pubspec.yaml index a2f9129a..7a04bfde 100644 --- a/flutter_quill_extensions/pubspec.yaml +++ b/flutter_quill_extensions/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - flutter_quill: ^7.1.15 + flutter_quill: ^7.1.16 image_picker: ^0.8.5+3 photo_view: ^0.14.0 diff --git a/lib/src/models/documents/attribute.dart b/lib/src/models/documents/attribute.dart index 6c48e59e..c8d40360 100644 --- a/lib/src/models/documents/attribute.dart +++ b/lib/src/models/documents/attribute.dart @@ -373,7 +373,7 @@ class ScriptAttribute extends Attribute { enum ScriptAttributes { sup('super'), - sub('sup'); + sub('sub'); const ScriptAttributes(this.value); diff --git a/pubspec.yaml b/pubspec.yaml index b76d6bd0..c4b0e341 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 7.1.15 +version: 7.1.16 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill From aab7ee8f6173e616d3c3221e1f0332e7646dc6f9 Mon Sep 17 00:00:00 2001 From: MacDeveloper1 <130981115+MacDeveloper1@users.noreply.github.com> Date: Mon, 8 May 2023 17:14:40 +0200 Subject: [PATCH 3/5] Rename `_AxisDivider` to `QuillDivider` and make it public (#1205) --- lib/src/widgets/toolbar.dart | 33 +++++++++++++++++++++++++-------- pubspec.yaml | 2 +- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index c8a534c6..f1cb3d96 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -409,7 +409,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { isButtonGroupShown[3] || isButtonGroupShown[4] || isButtonGroupShown[5])) - _AxisDivider(axis, + QuillDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showAlignmentButtons) SelectAlignmentButton( @@ -445,7 +445,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { isButtonGroupShown[3] || isButtonGroupShown[4] || isButtonGroupShown[5])) - _AxisDivider(axis, + QuillDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showHeaderStyle) SelectHeaderStyleButton( @@ -462,7 +462,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { (isButtonGroupShown[3] || isButtonGroupShown[4] || isButtonGroupShown[5])) - _AxisDivider(axis, + QuillDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showListNumbers) ToggleStyleButton( @@ -507,7 +507,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { if (showDividers && isButtonGroupShown[3] && (isButtonGroupShown[4] || isButtonGroupShown[5])) - _AxisDivider(axis, + QuillDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showQuote) ToggleStyleButton( @@ -540,7 +540,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { afterButtonPressed: afterButtonPressed, ), if (showDividers && isButtonGroupShown[4] && isButtonGroupShown[5]) - _AxisDivider(axis, + QuillDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), if (showLink) LinkStyleButton( @@ -563,7 +563,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { ), if (customButtons.isNotEmpty) if (showDividers) - _AxisDivider(axis, + QuillDivider(axis, color: sectionDividerColor, space: sectionDividerSpace), for (var customButton in customButtons) QuillIconButton( @@ -643,16 +643,33 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { } } -class _AxisDivider extends StatelessWidget { - const _AxisDivider( +/// The divider which is used for separation of buttons in the toolbar. +/// +/// It can be used outside of this package, for example when user does not use +/// [QuillToolbar.basic] and compose toolbat's children on its own. +class QuillDivider extends StatelessWidget { + const QuillDivider( this.axis, { Key? key, this.color, this.space, }) : super(key: key); + /// Provides a horizonal divider for vertical toolbar. + const QuillDivider.horizontal({Color? color, double? space}) + : this(Axis.horizontal, color: color, space: space); + + /// Provides a horizonal divider for horizontal toolbar. + const QuillDivider.vertical({Color? color, double? space}) + : this(Axis.vertical, color: color, space: space); + + /// The axis along which the toolbar is. final Axis axis; + + /// The color to use when painting this divider's line. final Color? color; + + /// The divider's space (width or height) depending of [axis]. final double? space; @override diff --git a/pubspec.yaml b/pubspec.yaml index c4b0e341..324dbc80 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 7.1.16 +version: 7.1.16+1 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill From 1149d03199fd25e27e54ad6555319d5eee9ad6b6 Mon Sep 17 00:00:00 2001 From: shenjingfs Date: Tue, 9 May 2023 21:22:46 +0800 Subject: [PATCH 4/5] Fix custom text style of lists not work (#1207) --- lib/src/widgets/text_line.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/widgets/text_line.dart b/lib/src/widgets/text_line.dart index f4dbc899..f38cbebf 100644 --- a/lib/src/widgets/text_line.dart +++ b/lib/src/widgets/text_line.dart @@ -282,7 +282,7 @@ class _TextLineState extends State { toMerge = defaultStyles.quote!.style; } else if (block == Attribute.codeBlock) { toMerge = defaultStyles.code!.style; - } else if (block == Attribute.list) { + } else if (block?.key == Attribute.list.key) { toMerge = defaultStyles.lists!.style; } From 8758c2d9529c5601bd66ac6466f42f6d5dad8612 Mon Sep 17 00:00:00 2001 From: francksoudan <112876604+francksoudan@users.noreply.github.com> Date: Wed, 10 May 2023 16:03:35 +0200 Subject: [PATCH 5/5] 7.1.17 release: updates dependencies (#1208) --- CHANGELOG.md | 3 +++ flutter_quill_extensions/pubspec.yaml | 2 +- pubspec.yaml | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f51ff476..46b9b977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [7.1.17] +- Updates `device_info_plus` to version 9.0.0 to benefit from AGP 8 (see [changelog#900](https://pub.dev/packages/device_info_plus/changelog#900)). + # [7.1.16] - Fixed subscript key from 'sup' to 'sub'. diff --git a/flutter_quill_extensions/pubspec.yaml b/flutter_quill_extensions/pubspec.yaml index 7a04bfde..f03c97c7 100644 --- a/flutter_quill_extensions/pubspec.yaml +++ b/flutter_quill_extensions/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter - flutter_quill: ^7.1.16 + flutter_quill: ^7.1.17 image_picker: ^0.8.5+3 photo_view: ^0.14.0 diff --git a/pubspec.yaml b/pubspec.yaml index 324dbc80..0a369e47 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 7.1.16+1 +version: 7.1.17+1 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill @@ -21,7 +21,7 @@ dependencies: characters: ^1.2.1 diff_match_patch: ^0.4.1 i18n_extension: ^8.0.0 - device_info_plus: ^8.1.0 + device_info_plus: ^9.0.0 platform: ^3.1.0 pasteboard: ^0.2.0