Restore removed options

pull/1633/head
Aleksei 1 year ago
parent 2b6071371a
commit 492c91b68a
  1. 78
      lib/src/models/config/toolbar/buttons/select_header_style_dropdown_button_configurations.dart

@ -1,5 +1,4 @@
import 'package:flutter/widgets.dart' import 'package:flutter/material.dart';
show IconData, TextStyle, ValueChanged, VoidCallback;
import '../../../../widgets/toolbar/base_toolbar.dart'; import '../../../../widgets/toolbar/base_toolbar.dart';
import '../../../documents/attribute.dart'; import '../../../documents/attribute.dart';
@ -21,46 +20,67 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions
QuillToolbarSelectHeaderStyleDropdownButtonOptions, QuillToolbarSelectHeaderStyleDropdownButtonOptions,
QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions> { QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions> {
const QuillToolbarSelectHeaderStyleDropdownButtonOptions({ const QuillToolbarSelectHeaderStyleDropdownButtonOptions({
super.iconData,
super.afterButtonPressed, super.afterButtonPressed,
super.childBuilder,
super.iconTheme,
super.tooltip, super.tooltip,
super.iconTheme,
super.childBuilder,
this.iconSize, this.iconSize,
this.iconButtonFactor, this.iconButtonFactor,
this.textStyle, this.fillColor,
super.iconData, this.hoverElevation = 1,
this.highlightElevation = 1,
this.onSelected,
this.attributes, 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? iconSize;
final double? iconButtonFactor; final double? iconButtonFactor;
final TextStyle? textStyle; final Color? fillColor;
final double hoverElevation;
/// Header attributes, defaults to: final double highlightElevation;
/// ```dart final ValueChanged<String>? onSelected;
/// [ final List<Attribute>? attributes;
/// Attribute.h1, final EdgeInsetsGeometry? padding;
/// Attribute.h2, final TextStyle? style;
/// Attribute.h3, final double? width;
/// Attribute.h4, final TextOverflow labelOverflow;
/// Attribute.h5, final double? itemHeight;
/// Attribute.h6, final EdgeInsets? itemPadding;
/// Attribute.header, final Color? defaultItemColor;
/// ] final bool renderItemTextStyle;
/// ```
final List<Attribute<int>>? attributes;
QuillToolbarSelectHeaderStyleDropdownButtonOptions copyWith({ QuillToolbarSelectHeaderStyleDropdownButtonOptions copyWith({
Color? fillColor,
double? hoverElevation,
double? highlightElevation,
List<PopupMenuEntry<String>>? items,
ValueChanged<String>? onSelected, ValueChanged<String>? onSelected,
List<Attribute<int>>? attributes, List<Attribute>? attributes,
EdgeInsetsGeometry? padding,
TextStyle? style, TextStyle? style,
double? width,
TextOverflow? labelOverflow,
bool? renderFontFamilies,
bool? overrideTooltipByFontFamily,
double? itemHeight,
EdgeInsets? itemPadding,
Color? defaultItemColor,
double? iconSize, double? iconSize,
double? iconButtonFactor, double? iconButtonFactor,
IconData? iconData, IconData? iconData,
VoidCallback? afterButtonPressed, VoidCallback? afterButtonPressed,
String? tooltip, String? tooltip,
QuillIconTheme? iconTheme, QuillIconTheme? iconTheme,
bool? renderItemTextStyle,
}) { }) {
return QuillToolbarSelectHeaderStyleDropdownButtonOptions( return QuillToolbarSelectHeaderStyleDropdownButtonOptions(
attributes: attributes ?? this.attributes, attributes: attributes ?? this.attributes,
@ -68,8 +88,20 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions
afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed, afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed,
tooltip: tooltip ?? this.tooltip, tooltip: tooltip ?? this.tooltip,
iconTheme: iconTheme ?? this.iconTheme, 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, iconSize: iconSize ?? this.iconSize,
iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor, iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor,
fillColor: fillColor ?? this.fillColor,
hoverElevation: hoverElevation ?? this.hoverElevation,
highlightElevation: highlightElevation ?? this.highlightElevation,
renderItemTextStyle: renderItemTextStyle ?? this.renderItemTextStyle,
); );
} }
} }

Loading…
Cancel
Save