Rename `dividerColor` to `sectionDividerColor`

Rename `dividerSpace` to `sectionDividerSpace`
pull/1179/head
BambinoUA 2 years ago
parent 2669591d28
commit f3ad1affca
  1. 34
      lib/src/widgets/toolbar.dart

@ -60,8 +60,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
this.customButtons = const [], this.customButtons = const [],
this.locale, this.locale,
VoidCallback? afterButtonPressed, VoidCallback? afterButtonPressed,
this.dividerColor, this.sectionDividerColor,
this.dividerSpace, this.sectionDividerSpace,
Key? key, Key? key,
}) : super(key: key); }) : super(key: key);
@ -146,10 +146,10 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
Color? color, Color? color,
/// The color of the toolbar section divider /// The color of the toolbar section divider
Color? dividerColor, Color? sectionDividerColor,
/// The space occupied by toolbar divider /// The space occupied by toolbar divider
double? dividerSpace, double? sectionDividerSpace,
Key? key, Key? key,
}) { }) {
final isButtonGroupShown = [ final isButtonGroupShown = [
@ -384,7 +384,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
isButtonGroupShown[3] || isButtonGroupShown[3] ||
isButtonGroupShown[4] || isButtonGroupShown[4] ||
isButtonGroupShown[5])) isButtonGroupShown[5]))
AxisDivider(axis, color: dividerColor, space: dividerSpace), AxisDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace),
if (showAlignmentButtons) if (showAlignmentButtons)
SelectAlignmentButton( SelectAlignmentButton(
controller: controller, controller: controller,
@ -419,7 +420,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
isButtonGroupShown[3] || isButtonGroupShown[3] ||
isButtonGroupShown[4] || isButtonGroupShown[4] ||
isButtonGroupShown[5])) isButtonGroupShown[5]))
AxisDivider(axis, color: dividerColor, space: dividerSpace), AxisDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace),
if (showHeaderStyle) if (showHeaderStyle)
SelectHeaderStyleButton( SelectHeaderStyleButton(
tooltip: buttonTooltips[ToolbarButtons.headerStyle], tooltip: buttonTooltips[ToolbarButtons.headerStyle],
@ -435,7 +437,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
(isButtonGroupShown[3] || (isButtonGroupShown[3] ||
isButtonGroupShown[4] || isButtonGroupShown[4] ||
isButtonGroupShown[5])) isButtonGroupShown[5]))
AxisDivider(axis, color: dividerColor, space: dividerSpace), AxisDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace),
if (showListNumbers) if (showListNumbers)
ToggleStyleButton( ToggleStyleButton(
attribute: Attribute.ol, attribute: Attribute.ol,
@ -479,7 +482,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
if (showDividers && if (showDividers &&
isButtonGroupShown[3] && isButtonGroupShown[3] &&
(isButtonGroupShown[4] || isButtonGroupShown[5])) (isButtonGroupShown[4] || isButtonGroupShown[5]))
AxisDivider(axis, color: dividerColor, space: dividerSpace), AxisDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace),
if (showQuote) if (showQuote)
ToggleStyleButton( ToggleStyleButton(
attribute: Attribute.blockQuote, attribute: Attribute.blockQuote,
@ -511,7 +515,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
afterButtonPressed: afterButtonPressed, afterButtonPressed: afterButtonPressed,
), ),
if (showDividers && isButtonGroupShown[4] && isButtonGroupShown[5]) if (showDividers && isButtonGroupShown[4] && isButtonGroupShown[5])
AxisDivider(axis, color: dividerColor, space: dividerSpace), AxisDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace),
if (showLink) if (showLink)
LinkStyleButton( LinkStyleButton(
tooltip: buttonTooltips[ToolbarButtons.link], tooltip: buttonTooltips[ToolbarButtons.link],
@ -533,7 +538,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
), ),
if (customButtons.isNotEmpty) if (customButtons.isNotEmpty)
if (showDividers) if (showDividers)
AxisDivider(axis, color: dividerColor, space: dividerSpace), AxisDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace),
for (var customButton in customButtons) for (var customButton in customButtons)
QuillIconButton( QuillIconButton(
highlightElevation: 0, highlightElevation: 0,
@ -570,14 +576,14 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
/// List of custom buttons /// List of custom buttons
final List<QuillCustomButton> customButtons; final List<QuillCustomButton> customButtons;
/// The color to use when painting the line. /// The color to use when painting the toolbar section divider.
/// ///
/// If this is null, then the [DividerThemeData.color] is used. If that is /// If this is null, then the [DividerThemeData.color] is used. If that is
/// also null, then [ThemeData.dividerColor] is used. /// also null, then [ThemeData.dividerColor] is used.
final Color? dividerColor; final Color? sectionDividerColor;
/// The space occupied by toolbar divider. /// The space occupied by toolbar section divider.
final double? dividerSpace; final double? sectionDividerSpace;
@override @override
Size get preferredSize => axis == Axis.horizontal Size get preferredSize => axis == Axis.horizontal

Loading…
Cancel
Save