Skip to content

Commit f508a06

Browse files
authored
Prepare to release 9.0.2 (#1608)
* Prepare to release 9.0.2
1 parent 33e7c46 commit f508a06

File tree

8 files changed

+95
-116
lines changed

8 files changed

+95
-116
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
All notable changes to this project will be documented in this file.
44

55
## 9.0.2
6-
* Release instead of pre-release
6+
* Remove unused properties in the `QuillToolbarSelectHeaderStyleDropdownButton`
7+
* Fix the `QuillSimpleToolbar` when `useMaterial3` is false, please upgrade to the latest version of flutter for better support
78

89
## 9.0.2-dev.3
910
* Export `QuillSingleChildScrollView`

flutter_quill_extensions/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
All notable changes to this project will be documented in this file.
44

55
## 9.0.2
6-
* Release instead of pre-release
6+
* Remove unused properties in the `QuillToolbarSelectHeaderStyleDropdownButton`
7+
* Fix the `QuillSimpleToolbar` when `useMaterial3` is false, please upgrade to the latest version of flutter for better support
78

89
## 9.0.2-dev.3
910
* Export `QuillSingleChildScrollView`

flutter_quill_test/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
All notable changes to this project will be documented in this file.
44

55
## 9.0.2
6-
* Release instead of pre-release
6+
* Remove unused properties in the `QuillToolbarSelectHeaderStyleDropdownButton`
7+
* Fix the `QuillSimpleToolbar` when `useMaterial3` is false, please upgrade to the latest version of flutter for better support
78

89
## 9.0.2-dev.3
910
* Export `QuillSingleChildScrollView`
Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
import 'package:flutter/material.dart' show PopupMenuEntry;
21
import 'package:flutter/widgets.dart'
3-
show
4-
Color,
5-
EdgeInsets,
6-
EdgeInsetsGeometry,
7-
IconData,
8-
TextOverflow,
9-
TextStyle,
10-
ValueChanged,
11-
VoidCallback;
2+
show IconData, TextStyle, ValueChanged, VoidCallback;
123

134
import '../../../../widgets/toolbar/base_toolbar.dart';
145
import '../../../documents/attribute.dart';
@@ -38,31 +29,14 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions
3829
this.iconButtonFactor,
3930
this.textStyle,
4031
super.iconData,
41-
this.fillColor,
42-
this.hoverElevation = 1,
43-
this.highlightElevation = 1,
44-
this.onSelected,
4532
this.attributes,
46-
this.padding,
47-
this.style,
48-
this.width,
49-
this.labelOverflow = TextOverflow.visible,
50-
this.itemHeight,
51-
this.itemPadding,
52-
this.defaultItemColor,
53-
this.renderItemTextStyle = false,
5433
});
5534

5635
/// By default we will the toolbar axis from [QuillSimpleToolbarConfigurations]
5736
final double? iconSize;
5837
final double? iconButtonFactor;
5938
final TextStyle? textStyle;
6039

61-
final Color? fillColor;
62-
final double hoverElevation;
63-
final double highlightElevation;
64-
final ValueChanged<String>? onSelected;
65-
6640
/// Header attributes, defaults to:
6741
/// ```dart
6842
/// [
@@ -76,59 +50,26 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions
7650
/// ]
7751
/// ```
7852
final List<Attribute<int>>? attributes;
79-
final EdgeInsetsGeometry? padding;
80-
final TextStyle? style;
81-
final double? width;
82-
final TextOverflow labelOverflow;
83-
final double? itemHeight;
84-
final EdgeInsets? itemPadding;
85-
final Color? defaultItemColor;
86-
final bool renderItemTextStyle;
8753

8854
QuillToolbarSelectHeaderStyleDropdownButtonOptions copyWith({
89-
Color? fillColor,
90-
double? hoverElevation,
91-
double? highlightElevation,
92-
List<PopupMenuEntry<String>>? items,
9355
ValueChanged<String>? onSelected,
9456
List<Attribute<int>>? attributes,
95-
EdgeInsetsGeometry? padding,
9657
TextStyle? style,
97-
double? width,
98-
TextOverflow? labelOverflow,
99-
bool? renderFontFamilies,
100-
bool? overrideTooltipByFontFamily,
101-
double? itemHeight,
102-
EdgeInsets? itemPadding,
103-
Color? defaultItemColor,
10458
double? iconSize,
10559
double? iconButtonFactor,
10660
IconData? iconData,
10761
VoidCallback? afterButtonPressed,
10862
String? tooltip,
10963
QuillIconTheme? iconTheme,
110-
bool? renderItemTextStyle,
11164
}) {
11265
return QuillToolbarSelectHeaderStyleDropdownButtonOptions(
11366
attributes: attributes ?? this.attributes,
11467
iconData: iconData ?? this.iconData,
11568
afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed,
11669
tooltip: tooltip ?? this.tooltip,
11770
iconTheme: iconTheme ?? this.iconTheme,
118-
onSelected: onSelected ?? this.onSelected,
119-
padding: padding ?? this.padding,
120-
style: style ?? this.style,
121-
width: width ?? this.width,
122-
labelOverflow: labelOverflow ?? this.labelOverflow,
123-
itemHeight: itemHeight ?? this.itemHeight,
124-
itemPadding: itemPadding ?? this.itemPadding,
125-
defaultItemColor: defaultItemColor ?? this.defaultItemColor,
12671
iconSize: iconSize ?? this.iconSize,
12772
iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor,
128-
fillColor: fillColor ?? this.fillColor,
129-
hoverElevation: hoverElevation ?? this.hoverElevation,
130-
highlightElevation: highlightElevation ?? this.highlightElevation,
131-
renderItemTextStyle: renderItemTextStyle ?? this.renderItemTextStyle,
13273
);
13374
}
13475
}

lib/src/widgets/toolbar/buttons/font_family_button.dart

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,19 +183,30 @@ class QuillToolbarFontFamilyButtonState
183183
}
184184
return Tooltip(message: effectiveTooltip, child: child);
185185
},
186-
child: IconButton(
187-
// tooltip: '', // TODO: Use this here
188-
visualDensity: VisualDensity.compact,
189-
style: IconButton.styleFrom(
190-
shape: iconTheme?.borderRadius != null
191-
? RoundedRectangleBorder(
192-
borderRadius:
193-
BorderRadius.circular(iconTheme?.borderRadius ?? -1),
194-
)
195-
: null,
196-
),
197-
onPressed: _onPressed,
198-
icon: _buildContent(context),
186+
child: Builder(
187+
builder: (context) {
188+
final isMaterial3 = Theme.of(context).useMaterial3;
189+
if (!isMaterial3) {
190+
return RawMaterialButton(
191+
onPressed: _onPressed,
192+
child: _buildContent(context),
193+
);
194+
}
195+
return IconButton(
196+
// tooltip: , // TODO: Use this here
197+
visualDensity: VisualDensity.compact,
198+
style: IconButton.styleFrom(
199+
shape: iconTheme?.borderRadius != null
200+
? RoundedRectangleBorder(
201+
borderRadius: BorderRadius.circular(
202+
iconTheme?.borderRadius ?? -1),
203+
)
204+
: null,
205+
),
206+
onPressed: _onPressed,
207+
icon: _buildContent(context),
208+
);
209+
},
199210
),
200211
),
201212
);

lib/src/widgets/toolbar/buttons/font_size_button.dart

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,30 @@ class QuillToolbarFontSizeButtonState
142142
height: iconSize * 1.81,
143143
width: options.width,
144144
),
145-
child: UtilityWidgets.maybeTooltip(
146-
message: tooltip,
147-
child: IconButton(
148-
visualDensity: VisualDensity.compact,
149-
style: IconButton.styleFrom(
150-
shape: iconTheme?.borderRadius != null
151-
? RoundedRectangleBorder(
152-
borderRadius:
153-
BorderRadius.circular(iconTheme?.borderRadius ?? -1),
154-
)
155-
: null,
156-
),
157-
onPressed: _onPressed,
158-
icon: _buildContent(context),
159-
),
145+
child: Builder(
146+
builder: (context) {
147+
final isMaterial3 = Theme.of(context).useMaterial3;
148+
if (!isMaterial3) {
149+
return RawMaterialButton(
150+
onPressed: _onPressed,
151+
child: _buildContent(context),
152+
);
153+
}
154+
return IconButton(
155+
tooltip: tooltip,
156+
visualDensity: VisualDensity.compact,
157+
style: IconButton.styleFrom(
158+
shape: iconTheme?.borderRadius != null
159+
? RoundedRectangleBorder(
160+
borderRadius:
161+
BorderRadius.circular(iconTheme?.borderRadius ?? -1),
162+
)
163+
: null,
164+
),
165+
onPressed: _onPressed,
166+
icon: _buildContent(context),
167+
);
168+
},
160169
),
161170
);
162171
}

lib/src/widgets/toolbar/buttons/hearder_style/select_header_style_dropdown_button.dart

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class _QuillToolbarSelectHeaderStyleDropdownButtonState
2626
extends State<QuillToolbarSelectHeaderStyleDropdownButton> {
2727
Attribute<dynamic> _selectedItem = Attribute.header;
2828

29-
final _controller = MenuController();
29+
final _menuController = MenuController();
3030
@override
3131
void initState() {
3232
super.initState();
@@ -158,7 +158,7 @@ class _QuillToolbarSelectHeaderStyleDropdownButtonState
158158
}
159159

160160
return MenuAnchor(
161-
controller: _controller,
161+
controller: _menuController,
162162
menuChildren: headerAttributes
163163
.map(
164164
(e) => MenuItemButton(
@@ -169,31 +169,45 @@ class _QuillToolbarSelectHeaderStyleDropdownButtonState
169169
),
170170
)
171171
.toList(),
172-
child: IconButton(
173-
onPressed: () {
174-
if (_controller.isOpen) {
175-
_controller.close();
176-
return;
172+
child: Builder(
173+
builder: (context) {
174+
final isMaterial3 = Theme.of(context).useMaterial3;
175+
final child = Row(
176+
mainAxisSize: MainAxisSize.min,
177+
children: [
178+
Text(
179+
_label(_selectedItem),
180+
style: widget.options.textStyle ??
181+
TextStyle(
182+
fontSize: iconSize / 1.15,
183+
),
184+
),
185+
Icon(
186+
Icons.arrow_drop_down,
187+
size: iconSize * iconButtonFactor,
188+
),
189+
],
190+
);
191+
if (!isMaterial3) {
192+
return RawMaterialButton(
193+
onPressed: _onDropdownButtonPressed,
194+
child: child,
195+
);
177196
}
178-
_controller.open();
197+
return IconButton(
198+
onPressed: _onDropdownButtonPressed,
199+
icon: child,
200+
);
179201
},
180-
icon: Row(
181-
mainAxisSize: MainAxisSize.min,
182-
children: [
183-
Text(
184-
_label(_selectedItem),
185-
style: widget.options.textStyle ??
186-
TextStyle(
187-
fontSize: iconSize / 1.15,
188-
),
189-
),
190-
Icon(
191-
Icons.arrow_drop_down,
192-
size: iconSize * iconButtonFactor,
193-
),
194-
],
195-
),
196202
),
197203
);
198204
}
205+
206+
void _onDropdownButtonPressed() {
207+
if (_menuController.isOpen) {
208+
_menuController.close();
209+
return;
210+
}
211+
_menuController.open();
212+
}
199213
}

quill_html_converter/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
All notable changes to this project will be documented in this file.
44

55
## 9.0.2
6-
* Release instead of pre-release
6+
* Remove unused properties in the `QuillToolbarSelectHeaderStyleDropdownButton`
7+
* Fix the `QuillSimpleToolbar` when `useMaterial3` is false, please upgrade to the latest version of flutter for better support
78

89
## 9.0.2-dev.3
910
* Export `QuillSingleChildScrollView`

0 commit comments

Comments
 (0)