diff --git a/lib/src/widgets/toolbar/select_alignment_button.dart b/lib/src/widgets/toolbar/select_alignment_button.dart index 2da05149..89d75da9 100644 --- a/lib/src/widgets/toolbar/select_alignment_button.dart +++ b/lib/src/widgets/toolbar/select_alignment_button.dart @@ -13,6 +13,7 @@ class SelectAlignmentButton extends StatefulWidget { this.iconSize = kDefaultIconSize, this.iconTheme, this.showJustifyAlignment, + this.showRightAlignment, Key? key, }) : super(key: key); @@ -21,6 +22,7 @@ class SelectAlignmentButton extends StatefulWidget { final QuillIconTheme? iconTheme; final bool? showJustifyAlignment; + final bool? showRightAlignment; @override _SelectAlignmentButtonState createState() => _SelectAlignmentButtonState(); @@ -46,20 +48,20 @@ class _SelectAlignmentButtonState extends State { final _valueToText = { Attribute.leftAlignment: Attribute.leftAlignment.value!, Attribute.centerAlignment: Attribute.centerAlignment.value!, - Attribute.rightAlignment: Attribute.rightAlignment.value!, + if (widget.showRightAlignment!) Attribute.rightAlignment: Attribute.rightAlignment.value!, if (widget.showJustifyAlignment!) Attribute.justifyAlignment: Attribute.justifyAlignment.value!, }; final _valueAttribute = [ Attribute.leftAlignment, Attribute.centerAlignment, - Attribute.rightAlignment, + if (widget.showRightAlignment!) Attribute.rightAlignment, if (widget.showJustifyAlignment!) Attribute.justifyAlignment ]; final _valueString = [ Attribute.leftAlignment.value!, Attribute.centerAlignment.value!, - Attribute.rightAlignment.value!, + if (widget.showRightAlignment!) Attribute.rightAlignment.value!, if (widget.showJustifyAlignment!) Attribute.justifyAlignment.value!, ];