Prepare to release 9.0.2 (#1608)

* Prepare to release 9.0.2
pull/1613/head v9.0.2
Ellet 1 year ago committed by GitHub
parent 33e7c46288
commit f508a06170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 3
      flutter_quill_extensions/CHANGELOG.md
  3. 3
      flutter_quill_test/CHANGELOG.md
  4. 61
      lib/src/models/config/toolbar/buttons/select_header_style_dropdown_button_configurations.dart
  5. 37
      lib/src/widgets/toolbar/buttons/font_family_button.dart
  6. 39
      lib/src/widgets/toolbar/buttons/font_size_button.dart
  7. 62
      lib/src/widgets/toolbar/buttons/hearder_style/select_header_style_dropdown_button.dart
  8. 3
      quill_html_converter/CHANGELOG.md

@ -3,7 +3,8 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 9.0.2 ## 9.0.2
* Release instead of pre-release * Remove unused properties in the `QuillToolbarSelectHeaderStyleDropdownButton`
* Fix the `QuillSimpleToolbar` when `useMaterial3` is false, please upgrade to the latest version of flutter for better support
## 9.0.2-dev.3 ## 9.0.2-dev.3
* Export `QuillSingleChildScrollView` * Export `QuillSingleChildScrollView`

@ -3,7 +3,8 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 9.0.2 ## 9.0.2
* Release instead of pre-release * Remove unused properties in the `QuillToolbarSelectHeaderStyleDropdownButton`
* Fix the `QuillSimpleToolbar` when `useMaterial3` is false, please upgrade to the latest version of flutter for better support
## 9.0.2-dev.3 ## 9.0.2-dev.3
* Export `QuillSingleChildScrollView` * Export `QuillSingleChildScrollView`

@ -3,7 +3,8 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 9.0.2 ## 9.0.2
* Release instead of pre-release * Remove unused properties in the `QuillToolbarSelectHeaderStyleDropdownButton`
* Fix the `QuillSimpleToolbar` when `useMaterial3` is false, please upgrade to the latest version of flutter for better support
## 9.0.2-dev.3 ## 9.0.2-dev.3
* Export `QuillSingleChildScrollView` * Export `QuillSingleChildScrollView`

@ -1,14 +1,5 @@
import 'package:flutter/material.dart' show PopupMenuEntry;
import 'package:flutter/widgets.dart' import 'package:flutter/widgets.dart'
show show IconData, TextStyle, ValueChanged, VoidCallback;
Color,
EdgeInsets,
EdgeInsetsGeometry,
IconData,
TextOverflow,
TextStyle,
ValueChanged,
VoidCallback;
import '../../../../widgets/toolbar/base_toolbar.dart'; import '../../../../widgets/toolbar/base_toolbar.dart';
import '../../../documents/attribute.dart'; import '../../../documents/attribute.dart';
@ -38,19 +29,7 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions
this.iconButtonFactor, this.iconButtonFactor,
this.textStyle, this.textStyle,
super.iconData, super.iconData,
this.fillColor,
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] /// By default we will the toolbar axis from [QuillSimpleToolbarConfigurations]
@ -58,11 +37,6 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions
final double? iconButtonFactor; final double? iconButtonFactor;
final TextStyle? textStyle; final TextStyle? textStyle;
final Color? fillColor;
final double hoverElevation;
final double highlightElevation;
final ValueChanged<String>? onSelected;
/// Header attributes, defaults to: /// Header attributes, defaults to:
/// ```dart /// ```dart
/// [ /// [
@ -76,38 +50,17 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions
/// ] /// ]
/// ``` /// ```
final List<Attribute<int>>? attributes; final List<Attribute<int>>? 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({ QuillToolbarSelectHeaderStyleDropdownButtonOptions copyWith({
Color? fillColor,
double? hoverElevation,
double? highlightElevation,
List<PopupMenuEntry<String>>? items,
ValueChanged<String>? onSelected, ValueChanged<String>? onSelected,
List<Attribute<int>>? attributes, List<Attribute<int>>? 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,
@ -115,20 +68,8 @@ 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,
); );
} }
} }

@ -183,19 +183,30 @@ class QuillToolbarFontFamilyButtonState
} }
return Tooltip(message: effectiveTooltip, child: child); return Tooltip(message: effectiveTooltip, child: child);
}, },
child: IconButton( child: Builder(
// tooltip: '', // TODO: Use this here builder: (context) {
visualDensity: VisualDensity.compact, final isMaterial3 = Theme.of(context).useMaterial3;
style: IconButton.styleFrom( if (!isMaterial3) {
shape: iconTheme?.borderRadius != null return RawMaterialButton(
? RoundedRectangleBorder( onPressed: _onPressed,
borderRadius: child: _buildContent(context),
BorderRadius.circular(iconTheme?.borderRadius ?? -1), );
) }
: null, return IconButton(
), // tooltip: , // TODO: Use this here
onPressed: _onPressed, visualDensity: VisualDensity.compact,
icon: _buildContent(context), style: IconButton.styleFrom(
shape: iconTheme?.borderRadius != null
? RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
iconTheme?.borderRadius ?? -1),
)
: null,
),
onPressed: _onPressed,
icon: _buildContent(context),
);
},
), ),
), ),
); );

@ -142,21 +142,30 @@ class QuillToolbarFontSizeButtonState
height: iconSize * 1.81, height: iconSize * 1.81,
width: options.width, width: options.width,
), ),
child: UtilityWidgets.maybeTooltip( child: Builder(
message: tooltip, builder: (context) {
child: IconButton( final isMaterial3 = Theme.of(context).useMaterial3;
visualDensity: VisualDensity.compact, if (!isMaterial3) {
style: IconButton.styleFrom( return RawMaterialButton(
shape: iconTheme?.borderRadius != null onPressed: _onPressed,
? RoundedRectangleBorder( child: _buildContent(context),
borderRadius: );
BorderRadius.circular(iconTheme?.borderRadius ?? -1), }
) return IconButton(
: null, tooltip: tooltip,
), visualDensity: VisualDensity.compact,
onPressed: _onPressed, style: IconButton.styleFrom(
icon: _buildContent(context), shape: iconTheme?.borderRadius != null
), ? RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(iconTheme?.borderRadius ?? -1),
)
: null,
),
onPressed: _onPressed,
icon: _buildContent(context),
);
},
), ),
); );
} }

@ -26,7 +26,7 @@ class _QuillToolbarSelectHeaderStyleDropdownButtonState
extends State<QuillToolbarSelectHeaderStyleDropdownButton> { extends State<QuillToolbarSelectHeaderStyleDropdownButton> {
Attribute<dynamic> _selectedItem = Attribute.header; Attribute<dynamic> _selectedItem = Attribute.header;
final _controller = MenuController(); final _menuController = MenuController();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -158,7 +158,7 @@ class _QuillToolbarSelectHeaderStyleDropdownButtonState
} }
return MenuAnchor( return MenuAnchor(
controller: _controller, controller: _menuController,
menuChildren: headerAttributes menuChildren: headerAttributes
.map( .map(
(e) => MenuItemButton( (e) => MenuItemButton(
@ -169,31 +169,45 @@ class _QuillToolbarSelectHeaderStyleDropdownButtonState
), ),
) )
.toList(), .toList(),
child: IconButton( child: Builder(
onPressed: () { builder: (context) {
if (_controller.isOpen) { final isMaterial3 = Theme.of(context).useMaterial3;
_controller.close(); final child = Row(
return; mainAxisSize: MainAxisSize.min,
children: [
Text(
_label(_selectedItem),
style: widget.options.textStyle ??
TextStyle(
fontSize: iconSize / 1.15,
),
),
Icon(
Icons.arrow_drop_down,
size: iconSize * iconButtonFactor,
),
],
);
if (!isMaterial3) {
return RawMaterialButton(
onPressed: _onDropdownButtonPressed,
child: child,
);
} }
_controller.open(); return IconButton(
onPressed: _onDropdownButtonPressed,
icon: child,
);
}, },
icon: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
_label(_selectedItem),
style: widget.options.textStyle ??
TextStyle(
fontSize: iconSize / 1.15,
),
),
Icon(
Icons.arrow_drop_down,
size: iconSize * iconButtonFactor,
),
],
),
), ),
); );
} }
void _onDropdownButtonPressed() {
if (_menuController.isOpen) {
_menuController.close();
return;
}
_menuController.open();
}
} }

@ -3,7 +3,8 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 9.0.2 ## 9.0.2
* Release instead of pre-release * Remove unused properties in the `QuillToolbarSelectHeaderStyleDropdownButton`
* Fix the `QuillSimpleToolbar` when `useMaterial3` is false, please upgrade to the latest version of flutter for better support
## 9.0.2-dev.3 ## 9.0.2-dev.3
* Export `QuillSingleChildScrollView` * Export `QuillSingleChildScrollView`

Loading…
Cancel
Save