|
|
@ -16,7 +16,7 @@ export 'buttons/history.dart'; |
|
|
|
export 'buttons/indent.dart'; |
|
|
|
export 'buttons/indent.dart'; |
|
|
|
export 'buttons/link_style.dart'; |
|
|
|
export 'buttons/link_style.dart'; |
|
|
|
export 'buttons/link_style2.dart'; |
|
|
|
export 'buttons/link_style2.dart'; |
|
|
|
export 'buttons/quill_font_size.dart'; |
|
|
|
export 'buttons/font_size.dart'; |
|
|
|
export 'buttons/quill_icon.dart'; |
|
|
|
export 'buttons/quill_icon.dart'; |
|
|
|
export 'buttons/search.dart'; |
|
|
|
export 'buttons/search.dart'; |
|
|
|
export 'buttons/select_alignment.dart'; |
|
|
|
export 'buttons/select_alignment.dart'; |
|
|
@ -232,7 +232,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
context.requireQuillController, |
|
|
|
context.requireQuillController, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showBoldButton) |
|
|
|
if (showBoldButton) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.bold, |
|
|
|
attribute: Attribute.bold, |
|
|
|
options: toolbarConfigurations.buttonOptions.bold, |
|
|
|
options: toolbarConfigurations.buttonOptions.bold, |
|
|
|
controller: toolbarConfigurations.buttonOptions.bold.controller ?? |
|
|
|
controller: toolbarConfigurations.buttonOptions.bold.controller ?? |
|
|
@ -245,7 +245,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showSubscript) |
|
|
|
if (showSubscript) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.subscript, |
|
|
|
attribute: Attribute.subscript, |
|
|
|
options: toolbarConfigurations.buttonOptions.subscript, |
|
|
|
options: toolbarConfigurations.buttonOptions.subscript, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -259,7 +259,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showSuperscript) |
|
|
|
if (showSuperscript) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.superscript, |
|
|
|
attribute: Attribute.superscript, |
|
|
|
options: toolbarConfigurations.buttonOptions.superscript, |
|
|
|
options: toolbarConfigurations.buttonOptions.superscript, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -273,7 +273,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showItalicButton) |
|
|
|
if (showItalicButton) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.italic, |
|
|
|
attribute: Attribute.italic, |
|
|
|
options: toolbarConfigurations.buttonOptions.italic, |
|
|
|
options: toolbarConfigurations.buttonOptions.italic, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -287,7 +287,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showSmallButton) |
|
|
|
if (showSmallButton) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.small, |
|
|
|
attribute: Attribute.small, |
|
|
|
options: toolbarConfigurations.buttonOptions.small, |
|
|
|
options: toolbarConfigurations.buttonOptions.small, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -301,7 +301,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showUnderLineButton) |
|
|
|
if (showUnderLineButton) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.underline, |
|
|
|
attribute: Attribute.underline, |
|
|
|
options: toolbarConfigurations.buttonOptions.underLine, |
|
|
|
options: toolbarConfigurations.buttonOptions.underLine, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -315,7 +315,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showStrikeThrough) |
|
|
|
if (showStrikeThrough) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.strikeThrough, |
|
|
|
attribute: Attribute.strikeThrough, |
|
|
|
options: toolbarConfigurations.buttonOptions.strikeThrough, |
|
|
|
options: toolbarConfigurations.buttonOptions.strikeThrough, |
|
|
|
controller: toolbarConfigurations |
|
|
|
controller: toolbarConfigurations |
|
|
@ -329,7 +329,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showInlineCode) |
|
|
|
if (showInlineCode) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.inlineCode, |
|
|
|
attribute: Attribute.inlineCode, |
|
|
|
options: toolbarConfigurations.buttonOptions.inlineCode, |
|
|
|
options: toolbarConfigurations.buttonOptions.inlineCode, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -343,7 +343,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showColorButton) |
|
|
|
if (showColorButton) |
|
|
|
ColorButton( |
|
|
|
QuillToolbarColorButton( |
|
|
|
icon: Icons.color_lens, |
|
|
|
icon: Icons.color_lens, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.color], |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.color], |
|
|
@ -355,7 +355,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
context.requireQuillSharedConfigurations.dialogBarrierColor, |
|
|
|
context.requireQuillSharedConfigurations.dialogBarrierColor, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showBackgroundColorButton) |
|
|
|
if (showBackgroundColorButton) |
|
|
|
ColorButton( |
|
|
|
QuillToolbarColorButton( |
|
|
|
icon: Icons.format_color_fill, |
|
|
|
icon: Icons.format_color_fill, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.backgroundColor], |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.backgroundColor], |
|
|
@ -367,7 +367,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
context.requireQuillSharedConfigurations.dialogBarrierColor, |
|
|
|
context.requireQuillSharedConfigurations.dialogBarrierColor, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showClearFormat) |
|
|
|
if (showClearFormat) |
|
|
|
ClearFormatButton( |
|
|
|
QuillToolbarClearFormatButton( |
|
|
|
icon: Icons.format_clear, |
|
|
|
icon: Icons.format_clear, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.clearFormat], |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.clearFormat], |
|
|
@ -391,7 +391,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
space: sectionDividerSpace, |
|
|
|
space: sectionDividerSpace, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showAlignmentButtons) |
|
|
|
if (showAlignmentButtons) |
|
|
|
SelectAlignmentButton( |
|
|
|
QuillToolbarSelectAlignmentButton( |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
tooltips: Map.of(buttonTooltips) |
|
|
|
tooltips: Map.of(buttonTooltips) |
|
|
|
..removeWhere((key, value) => ![ |
|
|
|
..removeWhere((key, value) => ![ |
|
|
@ -409,7 +409,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
afterButtonPressed: afterButtonPressed, |
|
|
|
afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showDirection) |
|
|
|
if (showDirection) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.rtl, |
|
|
|
attribute: Attribute.rtl, |
|
|
|
options: toolbarConfigurations.buttonOptions.direction, |
|
|
|
options: toolbarConfigurations.buttonOptions.direction, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -434,7 +434,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
space: sectionDividerSpace, |
|
|
|
space: sectionDividerSpace, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showHeaderStyle) |
|
|
|
if (showHeaderStyle) |
|
|
|
SelectHeaderStyleButton( |
|
|
|
QuillToolbarSelectHeaderStyleButton( |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.headerStyle], |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.headerStyle], |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
axis: axis, |
|
|
|
axis: axis, |
|
|
@ -454,7 +454,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
space: sectionDividerSpace, |
|
|
|
space: sectionDividerSpace, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showListNumbers) |
|
|
|
if (showListNumbers) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.ol, |
|
|
|
attribute: Attribute.ol, |
|
|
|
options: toolbarConfigurations.buttonOptions.listNumbers, |
|
|
|
options: toolbarConfigurations.buttonOptions.listNumbers, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -468,7 +468,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showListBullets) |
|
|
|
if (showListBullets) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.ul, |
|
|
|
attribute: Attribute.ul, |
|
|
|
options: toolbarConfigurations.buttonOptions.listBullets, |
|
|
|
options: toolbarConfigurations.buttonOptions.listBullets, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -482,7 +482,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showListCheck) |
|
|
|
if (showListCheck) |
|
|
|
ToggleCheckListButton( |
|
|
|
QuillToolbarToggleCheckListButton( |
|
|
|
attribute: Attribute.unchecked, |
|
|
|
attribute: Attribute.unchecked, |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.listChecks], |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.listChecks], |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
@ -492,7 +492,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
afterButtonPressed: afterButtonPressed, |
|
|
|
afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showCodeBlock) |
|
|
|
if (showCodeBlock) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.codeBlock, |
|
|
|
attribute: Attribute.codeBlock, |
|
|
|
options: toolbarConfigurations.buttonOptions.codeBlock, |
|
|
|
options: toolbarConfigurations.buttonOptions.codeBlock, |
|
|
|
controller: |
|
|
|
controller: |
|
|
@ -511,7 +511,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
QuillDivider(axis, |
|
|
|
QuillDivider(axis, |
|
|
|
color: sectionDividerColor, space: sectionDividerSpace), |
|
|
|
color: sectionDividerColor, space: sectionDividerSpace), |
|
|
|
if (showQuote) |
|
|
|
if (showQuote) |
|
|
|
ToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
options: toolbarConfigurations.buttonOptions.quote, |
|
|
|
options: toolbarConfigurations.buttonOptions.quote, |
|
|
|
controller: |
|
|
|
controller: |
|
|
|
toolbarConfigurations.buttonOptions.quote.controller ?? |
|
|
|
toolbarConfigurations.buttonOptions.quote.controller ?? |
|
|
@ -525,7 +525,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
// afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showIndent) |
|
|
|
if (showIndent) |
|
|
|
IndentButton( |
|
|
|
QuillToolbarIndentButton( |
|
|
|
icon: Icons.format_indent_increase, |
|
|
|
icon: Icons.format_indent_increase, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.indentIncrease], |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.indentIncrease], |
|
|
@ -535,7 +535,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
afterButtonPressed: afterButtonPressed, |
|
|
|
afterButtonPressed: afterButtonPressed, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showIndent) |
|
|
|
if (showIndent) |
|
|
|
IndentButton( |
|
|
|
QuillToolbarIndentButton( |
|
|
|
icon: Icons.format_indent_decrease, |
|
|
|
icon: Icons.format_indent_decrease, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.indentDecrease], |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.indentDecrease], |
|
|
@ -548,7 +548,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
QuillDivider(axis, |
|
|
|
QuillDivider(axis, |
|
|
|
color: sectionDividerColor, space: sectionDividerSpace), |
|
|
|
color: sectionDividerColor, space: sectionDividerSpace), |
|
|
|
if (showLink) |
|
|
|
if (showLink) |
|
|
|
LinkStyleButton( |
|
|
|
QuillToolbarLinkStyleButton( |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.link], |
|
|
|
tooltip: buttonTooltips[ToolbarButtons.link], |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
iconSize: toolbarIconSize, |
|
|
@ -561,7 +561,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
context.requireQuillSharedConfigurations.dialogBarrierColor, |
|
|
|
context.requireQuillSharedConfigurations.dialogBarrierColor, |
|
|
|
), |
|
|
|
), |
|
|
|
if (showSearchButton) |
|
|
|
if (showSearchButton) |
|
|
|
SearchButton( |
|
|
|
QuillToolbarSearchButton( |
|
|
|
icon: Icons.search, |
|
|
|
icon: Icons.search, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
iconSize: toolbarIconSize, |
|
|
|
dialogBarrierColor: |
|
|
|
dialogBarrierColor: |
|
|
@ -664,7 +664,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
height: axis == Axis.horizontal ? toolbarSize : null, |
|
|
|
height: axis == Axis.horizontal ? toolbarSize : null, |
|
|
|
width: axis == Axis.vertical ? toolbarSize : null, |
|
|
|
width: axis == Axis.vertical ? toolbarSize : null, |
|
|
|
), |
|
|
|
), |
|
|
|
child: ArrowIndicatedButtonList( |
|
|
|
child: QuillToolbarArrowIndicatedButtonList( |
|
|
|
axis: axis, |
|
|
|
axis: axis, |
|
|
|
buttons: childrenBuilder(context), |
|
|
|
buttons: childrenBuilder(context), |
|
|
|
), |
|
|
|
), |
|
|
|