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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save