Prepare to release 9.0.2

pull/1608/head
Ellet 1 year ago
parent 41b2483f90
commit 5004b66a48
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 3
      CHANGELOG.md
  2. 3
      flutter_quill_extensions/CHANGELOG.md
  3. 3
      flutter_quill_test/CHANGELOG.md
  4. 37
      lib/src/widgets/toolbar/buttons/font_family_button.dart
  5. 39
      lib/src/widgets/toolbar/buttons/font_size_button.dart
  6. 62
      lib/src/widgets/toolbar/buttons/hearder_style/select_header_style_dropdown_button.dart
  7. 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`

@ -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