Add `padding` and `style` to `QuillFontSizeButton`

pull/1179/head
BambinoUA 2 years ago
parent 8780c19080
commit b64e6783d7
  1. 9
      lib/src/widgets/toolbar/quill_font_size_button.dart

@ -22,6 +22,8 @@ class QuillFontSizeButton extends StatefulWidget {
this.iconTheme,
this.afterButtonPressed,
this.tooltip,
this.padding,
this.style,
Key? key,
}) : super(key: key);
@ -37,6 +39,8 @@ class QuillFontSizeButton extends StatefulWidget {
final QuillController controller;
final VoidCallback? afterButtonPressed;
final String? tooltip;
final EdgeInsetsGeometry? padding;
final TextStyle? style;
@override
_QuillFontSizeButtonState createState() => _QuillFontSizeButtonState();
@ -150,12 +154,13 @@ class _QuillFontSizeButtonState extends State<QuillFontSizeButton> {
Widget _buildContent(BuildContext context) {
final theme = Theme.of(context);
return Padding(
padding: const EdgeInsets.fromLTRB(10, 0, 0, 0),
padding: widget.padding ?? const EdgeInsets.fromLTRB(10, 0, 0, 0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(_currentValue,
style: TextStyle(
style: widget.style ??
TextStyle(
fontSize: widget.iconSize / 1.15,
color: widget.iconTheme?.iconUnselectedColor ??
theme.iconTheme.color)),

Loading…
Cancel
Save