parent
7f605048d1
commit
8bba105170
3 changed files with 136 additions and 110 deletions
@ -0,0 +1,116 @@ |
|||||||
|
import 'package:flutter/material.dart'; |
||||||
|
|
||||||
|
import '../../../../widgets/controller.dart'; |
||||||
|
import '../../../documents/attribute.dart'; |
||||||
|
import '../../../themes/quill_icon_theme.dart'; |
||||||
|
import '../../quill_configurations.dart'; |
||||||
|
|
||||||
|
class QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions |
||||||
|
extends QuillToolbarBaseButtonExtraOptions { |
||||||
|
const QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions({ |
||||||
|
required this.currentValue, |
||||||
|
required super.controller, |
||||||
|
required super.context, |
||||||
|
required super.onPressed, |
||||||
|
}); |
||||||
|
final Attribute currentValue; |
||||||
|
} |
||||||
|
|
||||||
|
class QuillToolbarSelectHeaderStyleDropdownButtonOptions |
||||||
|
extends QuillToolbarBaseButtonOptions< |
||||||
|
QuillToolbarSelectHeaderStyleDropdownButtonOptions, |
||||||
|
QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions> { |
||||||
|
const QuillToolbarSelectHeaderStyleDropdownButtonOptions({ |
||||||
|
super.controller, |
||||||
|
super.iconData, |
||||||
|
super.afterButtonPressed, |
||||||
|
super.tooltip, |
||||||
|
super.iconTheme, |
||||||
|
super.childBuilder, |
||||||
|
this.iconSize, |
||||||
|
this.iconButtonFactor, |
||||||
|
this.fillColor, |
||||||
|
this.hoverElevation = 1, |
||||||
|
this.highlightElevation = 1, |
||||||
|
this.rawItemsMap, |
||||||
|
this.onSelected, |
||||||
|
this.attributes, |
||||||
|
this.padding, |
||||||
|
this.style, |
||||||
|
this.width, |
||||||
|
this.initialValue, |
||||||
|
this.labelOverflow = TextOverflow.visible, |
||||||
|
this.itemHeight, |
||||||
|
this.itemPadding, |
||||||
|
this.defaultItemColor, |
||||||
|
}); |
||||||
|
|
||||||
|
final double? iconSize; |
||||||
|
final double? iconButtonFactor; |
||||||
|
final Color? fillColor; |
||||||
|
final double hoverElevation; |
||||||
|
final double highlightElevation; |
||||||
|
final Map<String, String>? rawItemsMap; |
||||||
|
final ValueChanged<String>? onSelected; |
||||||
|
final List<Attribute>? attributes; |
||||||
|
final EdgeInsetsGeometry? padding; |
||||||
|
final TextStyle? style; |
||||||
|
final double? width; |
||||||
|
final String? initialValue; |
||||||
|
final TextOverflow labelOverflow; |
||||||
|
final double? itemHeight; |
||||||
|
final EdgeInsets? itemPadding; |
||||||
|
final Color? defaultItemColor; |
||||||
|
|
||||||
|
QuillToolbarSelectHeaderStyleDropdownButtonOptions copyWith({ |
||||||
|
Color? fillColor, |
||||||
|
double? hoverElevation, |
||||||
|
double? highlightElevation, |
||||||
|
List<PopupMenuEntry<String>>? items, |
||||||
|
Map<String, String>? rawItemsMap, |
||||||
|
ValueChanged<String>? onSelected, |
||||||
|
List<Attribute>? attributes, |
||||||
|
EdgeInsetsGeometry? padding, |
||||||
|
TextStyle? style, |
||||||
|
double? width, |
||||||
|
String? initialValue, |
||||||
|
TextOverflow? labelOverflow, |
||||||
|
bool? renderFontFamilies, |
||||||
|
bool? overrideTooltipByFontFamily, |
||||||
|
double? itemHeight, |
||||||
|
EdgeInsets? itemPadding, |
||||||
|
Color? defaultItemColor, |
||||||
|
double? iconSize, |
||||||
|
double? iconButtonFactor, |
||||||
|
// Add properties to override inherited properties |
||||||
|
QuillController? controller, |
||||||
|
IconData? iconData, |
||||||
|
VoidCallback? afterButtonPressed, |
||||||
|
String? tooltip, |
||||||
|
QuillIconTheme? iconTheme, |
||||||
|
}) { |
||||||
|
return QuillToolbarSelectHeaderStyleDropdownButtonOptions( |
||||||
|
attributes: attributes ?? this.attributes, |
||||||
|
rawItemsMap: rawItemsMap ?? this.rawItemsMap, |
||||||
|
controller: controller ?? this.controller, |
||||||
|
iconData: iconData ?? this.iconData, |
||||||
|
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, |
||||||
|
initialValue: initialValue ?? this.initialValue, |
||||||
|
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, |
||||||
|
); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue