From 492c91b68a2cb40cc81ccd724c3e43e57155d955 Mon Sep 17 00:00:00 2001 From: Aleksei <130981115+MacDeveloper1@users.noreply.github.com> Date: Wed, 20 Dec 2023 09:47:32 +0100 Subject: [PATCH] Restore removed options --- ..._style_dropdown_button_configurations.dart | 78 +++++++++++++------ 1 file changed, 55 insertions(+), 23 deletions(-) diff --git a/lib/src/models/config/toolbar/buttons/select_header_style_dropdown_button_configurations.dart b/lib/src/models/config/toolbar/buttons/select_header_style_dropdown_button_configurations.dart index 8aafcc78..8a554e92 100644 --- a/lib/src/models/config/toolbar/buttons/select_header_style_dropdown_button_configurations.dart +++ b/lib/src/models/config/toolbar/buttons/select_header_style_dropdown_button_configurations.dart @@ -1,5 +1,4 @@ -import 'package:flutter/widgets.dart' - show IconData, TextStyle, ValueChanged, VoidCallback; +import 'package:flutter/material.dart'; import '../../../../widgets/toolbar/base_toolbar.dart'; import '../../../documents/attribute.dart'; @@ -21,46 +20,67 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions QuillToolbarSelectHeaderStyleDropdownButtonOptions, QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions> { const QuillToolbarSelectHeaderStyleDropdownButtonOptions({ + super.iconData, super.afterButtonPressed, - super.childBuilder, - super.iconTheme, super.tooltip, + super.iconTheme, + super.childBuilder, this.iconSize, this.iconButtonFactor, - this.textStyle, - super.iconData, + this.fillColor, + this.hoverElevation = 1, + this.highlightElevation = 1, + this.onSelected, this.attributes, + this.padding, + this.style, + this.width, + this.labelOverflow = TextOverflow.visible, + this.itemHeight, + this.itemPadding, + this.defaultItemColor, + this.renderItemTextStyle = false, }); - /// By default we will the toolbar axis from [QuillSimpleToolbarConfigurations] final double? iconSize; final double? iconButtonFactor; - final TextStyle? textStyle; - - /// Header attributes, defaults to: - /// ```dart - /// [ - /// Attribute.h1, - /// Attribute.h2, - /// Attribute.h3, - /// Attribute.h4, - /// Attribute.h5, - /// Attribute.h6, - /// Attribute.header, - /// ] - /// ``` - final List>? attributes; + final Color? fillColor; + final double hoverElevation; + final double highlightElevation; + final ValueChanged? onSelected; + final List? attributes; + final EdgeInsetsGeometry? padding; + final TextStyle? style; + final double? width; + final TextOverflow labelOverflow; + final double? itemHeight; + final EdgeInsets? itemPadding; + final Color? defaultItemColor; + final bool renderItemTextStyle; QuillToolbarSelectHeaderStyleDropdownButtonOptions copyWith({ + Color? fillColor, + double? hoverElevation, + double? highlightElevation, + List>? items, ValueChanged? onSelected, - List>? attributes, + List? attributes, + EdgeInsetsGeometry? padding, TextStyle? style, + double? width, + TextOverflow? labelOverflow, + bool? renderFontFamilies, + bool? overrideTooltipByFontFamily, + double? itemHeight, + EdgeInsets? itemPadding, + Color? defaultItemColor, double? iconSize, double? iconButtonFactor, IconData? iconData, VoidCallback? afterButtonPressed, String? tooltip, QuillIconTheme? iconTheme, + bool? renderItemTextStyle, }) { return QuillToolbarSelectHeaderStyleDropdownButtonOptions( attributes: attributes ?? this.attributes, @@ -68,8 +88,20 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed, tooltip: tooltip ?? this.tooltip, iconTheme: iconTheme ?? this.iconTheme, + onSelected: onSelected ?? this.onSelected, + padding: padding ?? this.padding, + style: style ?? this.style, + width: width ?? this.width, + labelOverflow: labelOverflow ?? this.labelOverflow, + itemHeight: itemHeight ?? this.itemHeight, + itemPadding: itemPadding ?? this.itemPadding, + defaultItemColor: defaultItemColor ?? this.defaultItemColor, iconSize: iconSize ?? this.iconSize, iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor, + fillColor: fillColor ?? this.fillColor, + hoverElevation: hoverElevation ?? this.hoverElevation, + highlightElevation: highlightElevation ?? this.highlightElevation, + renderItemTextStyle: renderItemTextStyle ?? this.renderItemTextStyle, ); } }