From 56213ffb3433350ddefb5e0f3fcd98a5b8819683 Mon Sep 17 00:00:00 2001 From: Ellet <73608287+freshtechtips@users.noreply.github.com> Date: Thu, 26 Oct 2023 20:39:16 +0300 Subject: [PATCH] Remove old property --- CHANGELOG.md | 1 + lib/src/models/config/toolbar/configurations.dart | 6 +++--- lib/src/widgets/toolbar/toolbar.dart | 9 ++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5ed02f0..92350ddc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Remove property `enableUnfocusOnTapOutside` in QuillEditor Configurations and add `isOnTapOutsideEnabled` instead - Add a new callback which is called `onTapOutside` in the `QuillEditorConfigurations` which allow you to do something when tap outside of the edtior - Fix a bug which cause the web platform to not unfocus the editor when tap outside of it (the default logic) to override this pleae pass a value to the callback ``onTapOutside`` +- Remove the old proerty of `iconTheme`, instead pass `iconTheme` in the button options, you will find `base` property there, inside it there is `iconTheme` ## [8.0.0] - If you have mirgrated recently, don't get scared from this update, it just add a documentation, mirgration guide and mark the version as more stable release, since we did break a lot of breaking changes (at least that what most developers says) we should have change the major version but when we were in the development of this new version, our time was very tight and now we are fixing the version number diff --git a/lib/src/models/config/toolbar/configurations.dart b/lib/src/models/config/toolbar/configurations.dart index 819b7bed..533ac8fb 100644 --- a/lib/src/models/config/toolbar/configurations.dart +++ b/lib/src/models/config/toolbar/configurations.dart @@ -101,7 +101,7 @@ class QuillToolbarConfigurations extends Equatable { this.linkDialogAction, ///The theme to use for the icons in the toolbar, uses type [QuillIconTheme] - this.iconTheme, + // this.iconTheme, this.dialogTheme, this.axis = Axis.horizontal, this.color, @@ -209,8 +209,8 @@ class QuillToolbarConfigurations extends Equatable { /// Toolbar items to display for controls of embed blocks final List? embedButtons; - ///The theme to use for the icons in the toolbar, uses type [QuillIconTheme] - final QuillIconTheme? iconTheme; + // ///The theme to use for the icons in the toolbar, uses type [QuillIconTheme] + // final QuillIconTheme? iconTheme; ///The theme to use for the theming of the [LinkDialog()], ///shown when embedding an image, for example diff --git a/lib/src/widgets/toolbar/toolbar.dart b/lib/src/widgets/toolbar/toolbar.dart index 9dbee7df..092f5012 100644 --- a/lib/src/widgets/toolbar/toolbar.dart +++ b/lib/src/widgets/toolbar/toolbar.dart @@ -182,7 +182,10 @@ class QuillToolbar extends StatelessWidget { ), if (theEmbedButtons != null) for (final builder in theEmbedButtons) - builder(controller, globalIconSize, configurations.iconTheme, + builder( + controller, + globalIconSize, + context.requireQuillToolbarBaseButtonOptions.iconTheme, configurations.dialogTheme), if (configurations.showDividers && isButtonGroupShown[0] && @@ -350,8 +353,8 @@ class QuillToolbar extends StatelessWidget { context.quillToolbarBaseButtonOptions?.iconData, iconColor: customButton.iconColor, iconSize: customButton.iconSize ?? globalIconSize, - iconTheme: configurations.iconTheme ?? - context.quillToolbarBaseButtonOptions?.iconTheme, + iconTheme: + context.requireQuillToolbarBaseButtonOptions.iconTheme, afterButtonPressed: customButton.afterButtonPressed ?? context .quillToolbarBaseButtonOptions?.afterButtonPressed,