From fe96d082014c3c0bde4ed021df0419732574bcbb Mon Sep 17 00:00:00 2001 From: Ellet Date: Tue, 19 Dec 2023 17:15:52 +0300 Subject: [PATCH] Update QuillToolbarIconButton --- lib/src/models/themes/quill_icon_theme.dart | 19 ++++++++++--------- .../toolbar/buttons/quill_icon_button.dart | 6 ++++++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/src/models/themes/quill_icon_theme.dart b/lib/src/models/themes/quill_icon_theme.dart index 65669668..8901e462 100644 --- a/lib/src/models/themes/quill_icon_theme.dart +++ b/lib/src/models/themes/quill_icon_theme.dart @@ -2,15 +2,16 @@ import 'package:flutter/material.dart'; @immutable class QuillIconTheme { - const QuillIconTheme( - {this.iconSelectedColor, - this.iconUnselectedColor, - this.iconSelectedFillColor, - this.iconUnselectedFillColor, - this.disabledIconColor, - this.disabledIconFillColor, - this.borderRadius, - this.padding}); + const QuillIconTheme({ + this.iconSelectedColor, + this.iconUnselectedColor, + this.iconSelectedFillColor, + this.iconUnselectedFillColor, + this.disabledIconColor, + this.disabledIconFillColor, + this.borderRadius, + this.padding, + }); ///The color to use for selected icons in the toolbar final Color? iconSelectedColor; diff --git a/lib/src/widgets/toolbar/buttons/quill_icon_button.dart b/lib/src/widgets/toolbar/buttons/quill_icon_button.dart index 22c2fa99..3024133b 100644 --- a/lib/src/widgets/toolbar/buttons/quill_icon_button.dart +++ b/lib/src/widgets/toolbar/buttons/quill_icon_button.dart @@ -9,6 +9,8 @@ class QuillToolbarIconButton extends StatelessWidget { this.tooltip, this.padding, super.key, + this.iconFilledStyle, + this.iconStyle, }); final VoidCallback? onPressed; @@ -19,6 +21,8 @@ class QuillToolbarIconButton extends StatelessWidget { final EdgeInsets? padding; final bool isFilled; + final ButtonStyle? iconStyle; + final ButtonStyle? iconFilledStyle; @override Widget build(BuildContext context) { if (isFilled) { @@ -26,6 +30,7 @@ class QuillToolbarIconButton extends StatelessWidget { padding: padding, onPressed: onPressed, icon: icon, + style: iconStyle, ); } return IconButton( @@ -35,6 +40,7 @@ class QuillToolbarIconButton extends StatelessWidget { afterPressed?.call(); }, icon: icon, + style: iconFilledStyle, ); } }