|
|
@ -60,6 +60,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
const QuillToolbar({ |
|
|
|
const QuillToolbar({ |
|
|
|
required this.children, |
|
|
|
required this.children, |
|
|
|
this.toolBarHeight = 36, |
|
|
|
this.toolBarHeight = 36, |
|
|
|
|
|
|
|
this.toolBarSectionSpacing, |
|
|
|
this.color, |
|
|
|
this.color, |
|
|
|
this.filePickImpl, |
|
|
|
this.filePickImpl, |
|
|
|
this.multiRowsDisplay, |
|
|
|
this.multiRowsDisplay, |
|
|
@ -70,7 +71,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
factory QuillToolbar.basic({ |
|
|
|
factory QuillToolbar.basic({ |
|
|
|
required QuillController controller, |
|
|
|
required QuillController controller, |
|
|
|
double toolbarIconSize = kDefaultIconSize, |
|
|
|
double toolbarIconSize = kDefaultIconSize, |
|
|
|
double toolbarSectionSpacing = 4, |
|
|
|
double toolBarSectionSpacing = 4, |
|
|
|
bool showBoldButton = true, |
|
|
|
bool showBoldButton = true, |
|
|
|
bool showItalicButton = true, |
|
|
|
bool showItalicButton = true, |
|
|
|
bool showSmallButton = false, |
|
|
|
bool showSmallButton = false, |
|
|
@ -149,6 +150,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
return QuillToolbar( |
|
|
|
return QuillToolbar( |
|
|
|
key: key, |
|
|
|
key: key, |
|
|
|
toolBarHeight: toolbarIconSize * 2, |
|
|
|
toolBarHeight: toolbarIconSize * 2, |
|
|
|
|
|
|
|
toolBarSectionSpacing: toolBarSectionSpacing, |
|
|
|
multiRowsDisplay: multiRowsDisplay, |
|
|
|
multiRowsDisplay: multiRowsDisplay, |
|
|
|
locale: locale, |
|
|
|
locale: locale, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
@ -411,7 +413,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
|
|
|
|
|
|
|
|
final List<Widget> children; |
|
|
|
final List<Widget> children; |
|
|
|
final double toolBarHeight; |
|
|
|
final double toolBarHeight; |
|
|
|
final double toolbarSectionSpacing; |
|
|
|
final double? toolBarSectionSpacing; |
|
|
|
final bool? multiRowsDisplay; |
|
|
|
final bool? multiRowsDisplay; |
|
|
|
|
|
|
|
|
|
|
|
/// The color of the toolbar. |
|
|
|
/// The color of the toolbar. |
|
|
@ -432,7 +434,6 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Size get preferredSize => Size.fromHeight(toolBarHeight); |
|
|
|
Size get preferredSize => Size.fromHeight(toolBarHeight); |
|
|
|
double get toolBarSectionSpacing2 => toolbarSectionSpacing; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
@ -442,7 +443,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
? Wrap( |
|
|
|
? Wrap( |
|
|
|
alignment: WrapAlignment.center, |
|
|
|
alignment: WrapAlignment.center, |
|
|
|
runSpacing: 4, |
|
|
|
runSpacing: 4, |
|
|
|
spacing: toolBarSectionSpacing2, |
|
|
|
spacing: toolBarSectionSpacing, |
|
|
|
children: children, |
|
|
|
children: children, |
|
|
|
) |
|
|
|
) |
|
|
|
: Container( |
|
|
|
: Container( |
|
|
|