Update toolbar.dart

pull/461/head
mark8044 4 years ago committed by GitHub
parent 986a96cef8
commit 1242a48c36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      lib/src/widgets/toolbar.dart

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

Loading…
Cancel
Save