Add `toolbarIconCrossAlignment` parameter to `QuillToolbar`

pull/1101/head
Adil Hanney 2 years ago
parent b225659e8b
commit 4cfb888ae9
No known key found for this signature in database
GPG Key ID: 27A0885BC5740457
  1. 8
      lib/src/widgets/toolbar.dart

@ -48,6 +48,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
this.axis = Axis.horizontal, this.axis = Axis.horizontal,
this.toolbarSize = 36, this.toolbarSize = 36,
this.toolbarIconAlignment = WrapAlignment.center, this.toolbarIconAlignment = WrapAlignment.center,
this.toolbarIconCrossAlignment = WrapCrossAlignment.center,
this.toolbarSectionSpacing = 4, this.toolbarSectionSpacing = 4,
this.multiRowsDisplay = true, this.multiRowsDisplay = true,
this.color, this.color,
@ -63,6 +64,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
double toolbarIconSize = kDefaultIconSize, double toolbarIconSize = kDefaultIconSize,
double toolbarSectionSpacing = 4, double toolbarSectionSpacing = 4,
WrapAlignment toolbarIconAlignment = WrapAlignment.center, WrapAlignment toolbarIconAlignment = WrapAlignment.center,
WrapCrossAlignment toolbarIconCrossAlignment = WrapCrossAlignment.center,
bool showDividers = true, bool showDividers = true,
bool showFontFamily = true, bool showFontFamily = true,
bool showFontSize = true, bool showFontSize = true,
@ -177,6 +179,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
toolbarSize: toolbarIconSize * 2, toolbarSize: toolbarIconSize * 2,
toolbarSectionSpacing: toolbarSectionSpacing, toolbarSectionSpacing: toolbarSectionSpacing,
toolbarIconAlignment: toolbarIconAlignment, toolbarIconAlignment: toolbarIconAlignment,
toolbarIconCrossAlignment: toolbarIconCrossAlignment,
multiRowsDisplay: multiRowsDisplay, multiRowsDisplay: multiRowsDisplay,
customButtons: customButtons, customButtons: customButtons,
locale: locale, locale: locale,
@ -504,6 +507,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
final double toolbarSize; final double toolbarSize;
final double toolbarSectionSpacing; final double toolbarSectionSpacing;
final WrapAlignment toolbarIconAlignment; final WrapAlignment toolbarIconAlignment;
final WrapCrossAlignment toolbarIconCrossAlignment;
final bool multiRowsDisplay; final bool multiRowsDisplay;
/// The color of the toolbar. /// The color of the toolbar.
@ -532,9 +536,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
? Wrap( ? Wrap(
direction: axis, direction: axis,
alignment: toolbarIconAlignment, alignment: toolbarIconAlignment,
crossAxisAlignment: toolbarIconAlignment == WrapAlignment.center crossAxisAlignment: toolbarIconCrossAlignment,
? WrapCrossAlignment.center
: WrapCrossAlignment.start,
runSpacing: 4, runSpacing: 4,
spacing: toolbarSectionSpacing, spacing: toolbarSectionSpacing,
children: children, children: children,

Loading…
Cancel
Save