Update QuillToolbarIconButton

pull/1621/head^2
Ellet 1 year ago
parent a70daa7bf9
commit fe96d08201
  1. 19
      lib/src/models/themes/quill_icon_theme.dart
  2. 6
      lib/src/widgets/toolbar/buttons/quill_icon_button.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;

@ -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,
);
}
}

Loading…
Cancel
Save