Skip to content

Commit a724836

Browse files
authored
Update toolbar.dart (singerdmx#466)
1 parent 4cce50a commit a724836

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/src/widgets/toolbar.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
7373
double toolbarIconSize = kDefaultIconSize,
7474
double toolbarSectionSpacing = 4,
7575
WrapAlignment toolbarIconAlignment = WrapAlignment.center,
76+
bool showDividers = true,
7677
bool showBoldButton = true,
7778
bool showItalicButton = true,
7879
bool showSmallButton = false,
@@ -280,7 +281,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
280281
webVideoPickImpl: webVideoPickImpl,
281282
iconTheme: iconTheme,
282283
),
283-
if (isButtonGroupShown[0] &&
284+
if (showDividers && isButtonGroupShown[0] &&
284285
(isButtonGroupShown[1] ||
285286
isButtonGroupShown[2] ||
286287
isButtonGroupShown[3] ||
@@ -301,7 +302,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
301302
showRightAlignment: showRightAlignment,
302303
showJustifyAlignment: showJustifyAlignment,
303304
),
304-
if (isButtonGroupShown[1] &&
305+
if (showDividers && isButtonGroupShown[1] &&
305306
(isButtonGroupShown[2] ||
306307
isButtonGroupShown[3] ||
307308
isButtonGroupShown[4] ||
@@ -317,7 +318,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
317318
iconSize: toolbarIconSize,
318319
iconTheme: iconTheme,
319320
),
320-
if (isButtonGroupShown[2] &&
321+
if (showDividers && isButtonGroupShown[2] &&
321322
(isButtonGroupShown[3] ||
322323
isButtonGroupShown[4] ||
323324
isButtonGroupShown[5]))
@@ -358,7 +359,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
358359
iconSize: toolbarIconSize,
359360
iconTheme: iconTheme,
360361
),
361-
if (isButtonGroupShown[3] &&
362+
if (showDividers && isButtonGroupShown[3] &&
362363
(isButtonGroupShown[4] || isButtonGroupShown[5]))
363364
VerticalDivider(
364365
indent: 12,
@@ -389,7 +390,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
389390
isIncrease: false,
390391
iconTheme: iconTheme,
391392
),
392-
if (isButtonGroupShown[4] && isButtonGroupShown[5])
393+
if (showDividers && isButtonGroupShown[4] && isButtonGroupShown[5])
393394
VerticalDivider(
394395
indent: 12,
395396
endIndent: 12,

0 commit comments

Comments
 (0)