pull/1634/head
Ellet 1 year ago
parent 6932c69716
commit fc0ddbca6a
  1. 3
      CHANGELOG.md
  2. 2
      example/lib/main.dart
  3. 9
      example/lib/presentation/quill/my_quill_toolbar.dart
  4. 1
      flutter_quill_extensions/lib/embeds/formula/toolbar/formula_button.dart
  5. 4
      lib/src/models/themes/quill_icon_theme.dart
  6. 6
      lib/src/widgets/toolbar/buttons/color/color_button.dart
  7. 1
      lib/src/widgets/toolbar/buttons/custom_button_button.dart
  8. 1
      lib/src/widgets/toolbar/buttons/link_style2_button.dart
  9. 1
      lib/src/widgets/toolbar/buttons/link_style_button.dart
  10. 2
      lib/src/widgets/toolbar/buttons/quill_icon_button.dart
  11. 1
      lib/src/widgets/toolbar/buttons/search/search_button.dart

@ -2,6 +2,9 @@
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.1.0
* Fix the simple toolbar by add properties of `IconButton` and fix some buttons
## 9.1.0-dev.2 ## 9.1.0-dev.2
* Fix the history buttons * Fix the history buttons

@ -56,7 +56,7 @@ class MyApp extends StatelessWidget {
), ),
), ),
darkTheme: ThemeData( darkTheme: ThemeData(
useMaterial3: false, useMaterial3: true,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
colorScheme: ColorScheme.fromSeed( colorScheme: ColorScheme.fromSeed(
brightness: Brightness.dark, brightness: Brightness.dark,

@ -202,6 +202,15 @@ class MyQuillToolbar extends StatelessWidget {
controller: controller, controller: controller,
showAlignmentButtons: true, showAlignmentButtons: true,
multiRowsDisplay: true, multiRowsDisplay: true,
buttonOptions: const QuillSimpleToolbarButtonOptions(
base: QuillToolbarBaseButtonOptions(
iconTheme: QuillIconTheme(
iconButtonUnselectedData: IconButtonData(
splashRadius: 200,
),
),
),
),
customButtons: [ customButtons: [
QuillToolbarCustomButtonOptions( QuillToolbarCustomButtonOptions(
icon: const Icon(Icons.add_alarm_rounded), icon: const Icon(Icons.add_alarm_rounded),

@ -94,6 +94,7 @@ class QuillToolbarFormulaButton extends StatelessWidget {
tooltip: tooltip, tooltip: tooltip,
onPressed: () => _sharedOnPressed(context), onPressed: () => _sharedOnPressed(context),
isSelected: false, isSelected: false,
iconTheme: iconTheme,
); );
} }

@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
@immutable @immutable
class QuillIconTheme { class QuillIconTheme {
const QuillIconTheme({ const QuillIconTheme({
this.padding,
this.iconButtonSelectedStyle, this.iconButtonSelectedStyle,
this.iconButtonUnselectedStyle, this.iconButtonUnselectedStyle,
this.iconButtonSelectedData, this.iconButtonSelectedData,
@ -17,9 +16,6 @@ class QuillIconTheme {
final IconButtonData? iconButtonUnselectedData; final IconButtonData? iconButtonUnselectedData;
final IconButtonData? iconButtonSelectedData; final IconButtonData? iconButtonSelectedData;
///The padding for icons
final EdgeInsets? padding;
} }
@immutable @immutable

@ -193,12 +193,14 @@ class QuillToolbarColorButtonState extends State<QuillToolbarColorButton> {
); );
} }
return IconButton( return QuillToolbarIconButton(
tooltip: tooltip, tooltip: tooltip,
iconSize: iconSize * iconButtonFactor, isSelected: false,
iconTheme: iconTheme,
icon: Icon( icon: Icon(
iconData, iconData,
color: widget.isBackground ? iconColorBackground : iconColor, color: widget.isBackground ? iconColorBackground : iconColor,
size: iconSize * iconButtonFactor,
), ),
onPressed: _showColorPicker, onPressed: _showColorPicker,
); );

@ -85,6 +85,7 @@ class QuillToolbarCustomButton extends StatelessWidget {
tooltip: tooltip, tooltip: tooltip,
onPressed: () => _onPressed(context), onPressed: () => _onPressed(context),
afterPressed: afterButtonPressed, afterPressed: afterButtonPressed,
iconTheme: iconTheme,
); );
} }
} }

@ -156,6 +156,7 @@ class _QuillToolbarLinkStyleButton2State
), ),
isSelected: isToggled, isSelected: isToggled,
onPressed: _openLinkDialog, onPressed: _openLinkDialog,
iconTheme: iconTheme,
afterPressed: afterButtonPressed, afterPressed: afterButtonPressed,
); );
} }

@ -149,6 +149,7 @@ class QuillToolbarLinkStyleButtonState
isSelected: isToggled, isSelected: isToggled,
onPressed: () => _openLinkDialog(context), onPressed: () => _openLinkDialog(context),
afterPressed: afterButtonPressed, afterPressed: afterButtonPressed,
iconTheme: iconTheme,
); );
} }

@ -7,10 +7,10 @@ class QuillToolbarIconButton extends StatelessWidget {
required this.onPressed, required this.onPressed,
required this.icon, required this.icon,
required this.isSelected, required this.isSelected,
required this.iconTheme,
this.afterPressed, this.afterPressed,
this.tooltip, this.tooltip,
super.key, super.key,
this.iconTheme,
}); });
final VoidCallback? onPressed; final VoidCallback? onPressed;

@ -122,6 +122,7 @@ class QuillToolbarSearchButton extends StatelessWidget {
isSelected: false, isSelected: false,
onPressed: () => _sharedOnPressed(context), onPressed: () => _sharedOnPressed(context),
afterPressed: afterButtonPressed, afterPressed: afterButtonPressed,
iconTheme: iconTheme,
); );
} }

Loading…
Cancel
Save