|
|
@ -102,6 +102,11 @@ class MyQuillToolbar extends StatelessWidget { |
|
|
|
configurations: QuillBaseToolbarConfigurations( |
|
|
|
configurations: QuillBaseToolbarConfigurations( |
|
|
|
toolbarSize: 15 * 2, |
|
|
|
toolbarSize: 15 * 2, |
|
|
|
multiRowsDisplay: false, |
|
|
|
multiRowsDisplay: false, |
|
|
|
|
|
|
|
buttonOptions: const QuillToolbarButtonOptions( |
|
|
|
|
|
|
|
base: QuillToolbarBaseButtonOptions( |
|
|
|
|
|
|
|
globalIconSize: 30, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
childrenBuilder: (context) { |
|
|
|
childrenBuilder: (context) { |
|
|
|
final controller = context.requireQuillController; |
|
|
|
final controller = context.requireQuillController; |
|
|
|
return [ |
|
|
|
return [ |
|
|
@ -122,9 +127,19 @@ class MyQuillToolbar extends StatelessWidget { |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
attribute: Attribute.bold, |
|
|
|
attribute: Attribute.bold, |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
options: QuillToolbarToggleStyleButtonOptions( |
|
|
|
iconData: Icons.format_bold, |
|
|
|
childBuilder: (options, extraOptions) { |
|
|
|
iconSize: 20, |
|
|
|
if (extraOptions.isToggled) { |
|
|
|
|
|
|
|
return IconButton.filled( |
|
|
|
|
|
|
|
onPressed: extraOptions.onPressed, |
|
|
|
|
|
|
|
icon: Icon(options.iconData), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return IconButton( |
|
|
|
|
|
|
|
onPressed: extraOptions.onPressed, |
|
|
|
|
|
|
|
icon: Icon(options.iconData), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
@ -132,7 +147,6 @@ class MyQuillToolbar extends StatelessWidget { |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
iconData: Icons.format_italic, |
|
|
|
iconData: Icons.format_italic, |
|
|
|
iconSize: 20, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
@ -147,7 +161,6 @@ class MyQuillToolbar extends StatelessWidget { |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
options: const QuillToolbarClearFormatButtonOptions( |
|
|
|
options: const QuillToolbarClearFormatButtonOptions( |
|
|
|
iconData: Icons.format_clear, |
|
|
|
iconData: Icons.format_clear, |
|
|
|
iconSize: 20, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
VerticalDivider( |
|
|
|
VerticalDivider( |
|
|
@ -166,7 +179,7 @@ class MyQuillToolbar extends StatelessWidget { |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
iconData: Icons.format_list_numbered, |
|
|
|
iconData: Icons.format_list_numbered, |
|
|
|
iconSize: 20, |
|
|
|
iconSize: 39, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
@ -174,7 +187,6 @@ class MyQuillToolbar extends StatelessWidget { |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
iconData: Icons.format_list_bulleted, |
|
|
|
iconData: Icons.format_list_bulleted, |
|
|
|
iconSize: 20, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
|
QuillToolbarToggleStyleButton( |
|
|
@ -182,7 +194,7 @@ class MyQuillToolbar extends StatelessWidget { |
|
|
|
controller: controller, |
|
|
|
controller: controller, |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
options: const QuillToolbarToggleStyleButtonOptions( |
|
|
|
iconData: Icons.format_quote, |
|
|
|
iconData: Icons.format_quote, |
|
|
|
iconSize: 20, |
|
|
|
iconSize: 15, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
VerticalDivider( |
|
|
|
VerticalDivider( |
|
|
|