From 1242a48c36fa5b4a2c97b03fb60936e70d52cc02 Mon Sep 17 00:00:00 2001 From: mark8044 <87546778+mark8044@users.noreply.github.com> Date: Sun, 14 Nov 2021 19:21:23 -0800 Subject: [PATCH] Update toolbar.dart --- lib/src/widgets/toolbar.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index 3e1f7e19..ae4ba1b8 100644 --- a/lib/src/widgets/toolbar.dart +++ b/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 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(