|
|
@ -432,7 +432,8 @@ class _SelectHeaderStyleButtonState extends State<SelectHeaderStyleButton> { |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
|
return _selectHeadingStyleButtonBuilder(context, _value, _selectAttribute, widget.controller.iconSize); |
|
|
|
return _selectHeadingStyleButtonBuilder( |
|
|
|
|
|
|
|
context, _value, _selectAttribute, widget.controller.iconSize); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -774,7 +775,8 @@ class _HistoryButtonState extends State<HistoryButton> { |
|
|
|
highlightElevation: 0, |
|
|
|
highlightElevation: 0, |
|
|
|
hoverElevation: 0, |
|
|
|
hoverElevation: 0, |
|
|
|
size: widget.controller.iconSize * 1.77, |
|
|
|
size: widget.controller.iconSize * 1.77, |
|
|
|
icon: Icon(widget.icon, size: widget.controller.iconSize, color: _iconColor), |
|
|
|
icon: Icon(widget.icon, |
|
|
|
|
|
|
|
size: widget.controller.iconSize, color: _iconColor), |
|
|
|
fillColor: fillColor, |
|
|
|
fillColor: fillColor, |
|
|
|
onPressed: _changeHistory, |
|
|
|
onPressed: _changeHistory, |
|
|
|
); |
|
|
|
); |
|
|
@ -839,7 +841,8 @@ class _IndentButtonState extends State<IndentButton> { |
|
|
|
highlightElevation: 0, |
|
|
|
highlightElevation: 0, |
|
|
|
hoverElevation: 0, |
|
|
|
hoverElevation: 0, |
|
|
|
size: widget.controller.iconSize * 1.77, |
|
|
|
size: widget.controller.iconSize * 1.77, |
|
|
|
icon: Icon(widget.icon, size: widget.controller.iconSize, color: iconColor), |
|
|
|
icon: |
|
|
|
|
|
|
|
Icon(widget.icon, size: widget.controller.iconSize, color: iconColor), |
|
|
|
fillColor: fillColor, |
|
|
|
fillColor: fillColor, |
|
|
|
onPressed: () { |
|
|
|
onPressed: () { |
|
|
|
final indent = widget.controller |
|
|
|
final indent = widget.controller |
|
|
@ -893,7 +896,8 @@ class _ClearFormatButtonState extends State<ClearFormatButton> { |
|
|
|
highlightElevation: 0, |
|
|
|
highlightElevation: 0, |
|
|
|
hoverElevation: 0, |
|
|
|
hoverElevation: 0, |
|
|
|
size: widget.controller.iconSize * 1.77, |
|
|
|
size: widget.controller.iconSize * 1.77, |
|
|
|
icon: Icon(widget.icon, size: widget.controller.iconSize, color: iconColor), |
|
|
|
icon: Icon(widget.icon, |
|
|
|
|
|
|
|
size: widget.controller.iconSize, color: iconColor), |
|
|
|
fillColor: fillColor, |
|
|
|
fillColor: fillColor, |
|
|
|
onPressed: () { |
|
|
|
onPressed: () { |
|
|
|
for (final k |
|
|
|
for (final k |
|
|
@ -905,7 +909,9 @@ class _ClearFormatButtonState extends State<ClearFormatButton> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class QuillToolbar extends StatefulWidget implements PreferredSizeWidget { |
|
|
|
class QuillToolbar extends StatefulWidget implements PreferredSizeWidget { |
|
|
|
const QuillToolbar({required this.children, this.toolBarHeight = 36, Key? key}) : super(key: key); |
|
|
|
const QuillToolbar( |
|
|
|
|
|
|
|
{required this.children, this.toolBarHeight = 36, Key? key}) |
|
|
|
|
|
|
|
: super(key: key); |
|
|
|
|
|
|
|
|
|
|
|
factory QuillToolbar.basic({ |
|
|
|
factory QuillToolbar.basic({ |
|
|
|
required QuillController controller, |
|
|
|
required QuillController controller, |
|
|
@ -932,7 +938,10 @@ class QuillToolbar extends StatefulWidget implements PreferredSizeWidget { |
|
|
|
}) { |
|
|
|
}) { |
|
|
|
controller.iconSize = toolbarIconSize; |
|
|
|
controller.iconSize = toolbarIconSize; |
|
|
|
|
|
|
|
|
|
|
|
return QuillToolbar(key: key, toolBarHeight: toolbarIconSize * controller.toolbarHeightFactor, children: [ |
|
|
|
return QuillToolbar( |
|
|
|
|
|
|
|
key: key, |
|
|
|
|
|
|
|
toolBarHeight: toolbarIconSize * controller.toolbarHeightFactor, |
|
|
|
|
|
|
|
children: [ |
|
|
|
Visibility( |
|
|
|
Visibility( |
|
|
|
visible: showHistory, |
|
|
|
visible: showHistory, |
|
|
|
child: HistoryButton( |
|
|
|
child: HistoryButton( |
|
|
@ -1032,9 +1041,14 @@ class QuillToolbar extends StatefulWidget implements PreferredSizeWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Visibility( |
|
|
|
Visibility( |
|
|
|
visible: showHeaderStyle, child: VerticalDivider(indent: 12, endIndent: 12, color: Colors.grey.shade400)), |
|
|
|
visible: showHeaderStyle, |
|
|
|
Visibility(visible: showHeaderStyle, child: SelectHeaderStyleButton(controller: controller)), |
|
|
|
child: VerticalDivider( |
|
|
|
VerticalDivider(indent: 12, endIndent: 12, color: Colors.grey.shade400), |
|
|
|
indent: 12, endIndent: 12, color: Colors.grey.shade400)), |
|
|
|
|
|
|
|
Visibility( |
|
|
|
|
|
|
|
visible: showHeaderStyle, |
|
|
|
|
|
|
|
child: SelectHeaderStyleButton(controller: controller)), |
|
|
|
|
|
|
|
VerticalDivider( |
|
|
|
|
|
|
|
indent: 12, endIndent: 12, color: Colors.grey.shade400), |
|
|
|
Visibility( |
|
|
|
Visibility( |
|
|
|
visible: showListNumbers, |
|
|
|
visible: showListNumbers, |
|
|
|
child: ToggleStyleButton( |
|
|
|
child: ToggleStyleButton( |
|
|
@ -1068,8 +1082,12 @@ class QuillToolbar extends StatefulWidget implements PreferredSizeWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Visibility( |
|
|
|
Visibility( |
|
|
|
visible: !showListNumbers && !showListBullets && !showListCheck && !showCodeBlock, |
|
|
|
visible: !showListNumbers && |
|
|
|
child: VerticalDivider(indent: 12, endIndent: 12, color: Colors.grey.shade400)), |
|
|
|
!showListBullets && |
|
|
|
|
|
|
|
!showListCheck && |
|
|
|
|
|
|
|
!showCodeBlock, |
|
|
|
|
|
|
|
child: VerticalDivider( |
|
|
|
|
|
|
|
indent: 12, endIndent: 12, color: Colors.grey.shade400)), |
|
|
|
Visibility( |
|
|
|
Visibility( |
|
|
|
visible: showQuote, |
|
|
|
visible: showQuote, |
|
|
|
child: ToggleStyleButton( |
|
|
|
child: ToggleStyleButton( |
|
|
@ -1094,8 +1112,13 @@ class QuillToolbar extends StatefulWidget implements PreferredSizeWidget { |
|
|
|
isIncrease: false, |
|
|
|
isIncrease: false, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Visibility(visible: showQuote, child: VerticalDivider(indent: 12, endIndent: 12, color: Colors.grey.shade400)), |
|
|
|
Visibility( |
|
|
|
Visibility(visible: showLink, child: LinkStyleButton(controller: controller)), |
|
|
|
visible: showQuote, |
|
|
|
|
|
|
|
child: VerticalDivider( |
|
|
|
|
|
|
|
indent: 12, endIndent: 12, color: Colors.grey.shade400)), |
|
|
|
|
|
|
|
Visibility( |
|
|
|
|
|
|
|
visible: showLink, |
|
|
|
|
|
|
|
child: LinkStyleButton(controller: controller)), |
|
|
|
Visibility( |
|
|
|
Visibility( |
|
|
|
visible: showHorizontalRule, |
|
|
|
visible: showHorizontalRule, |
|
|
|
child: InsertEmbedButton( |
|
|
|
child: InsertEmbedButton( |
|
|
|