New merge from dev branch (#1602)

* Prepare to release 9.0.2
pull/1608/head^2
Ellet 1 year ago committed by GitHub
parent 4052779cfe
commit 33e7c46288
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .github/workflows/main.yml
  2. 24
      CHANGELOG.md
  3. 1
      README.md
  4. 18
      example/lib/main.dart
  5. 16
      example/lib/presentation/quill/my_quill_editor.dart
  6. 27
      example/lib/presentation/quill/my_quill_toolbar.dart
  7. 16
      example/lib/presentation/quill/quill_screen.dart
  8. 24
      flutter_quill_extensions/CHANGELOG.md
  9. 31
      flutter_quill_extensions/README.md
  10. 6
      flutter_quill_extensions/lib/flutter_quill_extensions.dart
  11. 1
      flutter_quill_extensions/lib/models/config/toolbar/buttons/camera.dart
  12. 1
      flutter_quill_extensions/lib/models/config/toolbar/buttons/image.dart
  13. 1
      flutter_quill_extensions/lib/models/config/toolbar/buttons/media_button.dart
  14. 1
      flutter_quill_extensions/lib/models/config/toolbar/buttons/video.dart
  15. 2
      flutter_quill_extensions/pubspec.yaml
  16. 24
      flutter_quill_test/CHANGELOG.md
  17. 2
      flutter_quill_test/pubspec.yaml
  18. 3
      lib/flutter_quill.dart
  19. 18
      lib/src/l10n/generated/quill_localizations.dart
  20. 9
      lib/src/l10n/generated/quill_localizations_ar.dart
  21. 9
      lib/src/l10n/generated/quill_localizations_bg.dart
  22. 9
      lib/src/l10n/generated/quill_localizations_bn.dart
  23. 9
      lib/src/l10n/generated/quill_localizations_cs.dart
  24. 9
      lib/src/l10n/generated/quill_localizations_da.dart
  25. 9
      lib/src/l10n/generated/quill_localizations_de.dart
  26. 9
      lib/src/l10n/generated/quill_localizations_en.dart
  27. 9
      lib/src/l10n/generated/quill_localizations_es.dart
  28. 9
      lib/src/l10n/generated/quill_localizations_fa.dart
  29. 9
      lib/src/l10n/generated/quill_localizations_fr.dart
  30. 9
      lib/src/l10n/generated/quill_localizations_he.dart
  31. 9
      lib/src/l10n/generated/quill_localizations_hi.dart
  32. 9
      lib/src/l10n/generated/quill_localizations_id.dart
  33. 9
      lib/src/l10n/generated/quill_localizations_it.dart
  34. 9
      lib/src/l10n/generated/quill_localizations_ja.dart
  35. 9
      lib/src/l10n/generated/quill_localizations_ko.dart
  36. 9
      lib/src/l10n/generated/quill_localizations_ms.dart
  37. 9
      lib/src/l10n/generated/quill_localizations_nl.dart
  38. 9
      lib/src/l10n/generated/quill_localizations_no.dart
  39. 9
      lib/src/l10n/generated/quill_localizations_pl.dart
  40. 9
      lib/src/l10n/generated/quill_localizations_pt.dart
  41. 21
      lib/src/l10n/generated/quill_localizations_ru.dart
  42. 9
      lib/src/l10n/generated/quill_localizations_sr.dart
  43. 9
      lib/src/l10n/generated/quill_localizations_sw.dart
  44. 9
      lib/src/l10n/generated/quill_localizations_tk.dart
  45. 9
      lib/src/l10n/generated/quill_localizations_tr.dart
  46. 32
      lib/src/l10n/generated/quill_localizations_uk.dart
  47. 9
      lib/src/l10n/generated/quill_localizations_ur.dart
  48. 9
      lib/src/l10n/generated/quill_localizations_vi.dart
  49. 9
      lib/src/l10n/generated/quill_localizations_zh.dart
  50. 3
      lib/src/l10n/quill_en.arb
  51. 7
      lib/src/l10n/quill_ru.arb
  52. 15
      lib/src/l10n/quill_uk.arb
  53. 114
      lib/src/l10n/untranslated.json
  54. 9
      lib/src/models/config/editor/elements/list/ordered_list.dart
  55. 9
      lib/src/models/config/editor/elements/list/unordered_list.dart
  56. 16
      lib/src/models/config/toolbar/base_button_configurations.dart
  57. 1
      lib/src/models/config/toolbar/buttons/clear_format_configurations.dart
  58. 3
      lib/src/models/config/toolbar/buttons/color_configurations.dart
  59. 3
      lib/src/models/config/toolbar/buttons/custom_button_configurations.dart
  60. 4
      lib/src/models/config/toolbar/buttons/font_family_configurations.dart
  61. 4
      lib/src/models/config/toolbar/buttons/font_size_configurations.dart
  62. 1
      lib/src/models/config/toolbar/buttons/history_configurations.dart
  63. 3
      lib/src/models/config/toolbar/buttons/indent_configurations.dart
  64. 3
      lib/src/models/config/toolbar/buttons/link_style2_configurations.dart
  65. 1
      lib/src/models/config/toolbar/buttons/link_style_configurations.dart
  66. 1
      lib/src/models/config/toolbar/buttons/search_configurations.dart
  67. 3
      lib/src/models/config/toolbar/buttons/select_alignment_configurations.dart
  68. 10
      lib/src/models/config/toolbar/buttons/select_header_style_buttons_configurations.dart
  69. 134
      lib/src/models/config/toolbar/buttons/select_header_style_dropdown_button_configurations.dart
  70. 1
      lib/src/models/config/toolbar/buttons/toggle_check_list_configurations.dart
  71. 3
      lib/src/models/config/toolbar/buttons/toggle_style_configurations.dart
  72. 136
      lib/src/models/config/toolbar/simple_toolbar_button_options.dart
  73. 147
      lib/src/models/config/toolbar/simple_toolbar_configurations.dart
  74. 4
      lib/src/models/config/toolbar/toolbar_configurations.dart
  75. 6
      lib/src/models/config/toolbar/toolbar_shared_configurations.dart
  76. 12
      lib/src/models/documents/attribute.dart
  77. 39
      lib/src/models/documents/document.dart
  78. 2
      lib/src/models/themes/quill_icon_theme.dart
  79. 31
      lib/src/utils/font.dart
  80. 12
      lib/src/utils/string.dart
  81. 118
      lib/src/widgets/others/default_styles.dart
  82. 91
      lib/src/widgets/quill/quill_controller.dart
  83. 60
      lib/src/widgets/quill/text_block.dart
  84. 9
      lib/src/widgets/quill/text_line.dart
  85. 23
      lib/src/widgets/raw_editor/raw_editor_state.dart
  86. 22
      lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart
  87. 15
      lib/src/widgets/style_widgets/bullet_point.dart
  88. 19
      lib/src/widgets/style_widgets/number_point.dart
  89. 3
      lib/src/widgets/toolbar/base_toolbar.dart
  90. 1
      lib/src/widgets/toolbar/buttons/clear_format_button.dart
  91. 1
      lib/src/widgets/toolbar/buttons/color/color_button.dart
  92. 1
      lib/src/widgets/toolbar/buttons/custom_button_button.dart
  93. 1
      lib/src/widgets/toolbar/buttons/font_size_button.dart
  94. 145
      lib/src/widgets/toolbar/buttons/hearder_style/select_header_style_button.dart
  95. 2
      lib/src/widgets/toolbar/buttons/hearder_style/select_header_style_buttons.dart
  96. 199
      lib/src/widgets/toolbar/buttons/hearder_style/select_header_style_dropdown_button.dart
  97. 1
      lib/src/widgets/toolbar/buttons/history_button.dart
  98. 1
      lib/src/widgets/toolbar/buttons/link_style_button.dart
  99. 6
      lib/src/widgets/toolbar/buttons/quill_icon_button.dart
  100. 1
      lib/src/widgets/toolbar/buttons/search/search_button.dart
  101. Some files were not shown because too many files have changed in this diff Show More

@ -25,6 +25,9 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: flutter pub get run: flutter pub get
- name: Install dart_quill_delta dependencies
run: flutter pub get -C dart_quill_delta
- name: Install flutter_quill_extensions dependencies - name: Install flutter_quill_extensions dependencies
run: flutter pub get -C flutter_quill_extensions run: flutter pub get -C flutter_quill_extensions

@ -2,6 +2,30 @@
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
* Release instead of pre-release
## 9.0.2-dev.3
* Export `QuillSingleChildScrollView`
## 9.0.2-dev.2
* Add the new translations for ru, uk arb files by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Add a new dropdown button by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Update the default style values by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Fix bug [#1562](https://github.com/singerdmx/flutter-quill/issues/1562)
* Fix the second bug of [#1480](https://github.com/singerdmx/flutter-quill/issues/1480)
## 9.0.2-dev.1
* Add configurations for the new dropdown `QuillToolbarSelectHeaderStyleButton`, you can use the orignal one or this
* Fix the [issue](https://github.com/singerdmx/flutter-quill/issues/1119) when enter is pressed, all font settings is lost
## 9.0.2-dev
* **Breaking change** Remove the spacer widget, removed the controller option for each button
* Add `toolbarRunSpacing` property to the simple toolbar
## 9.0.1
* Fix default icon size
## 9.0.0 ## 9.0.0
* This version is quite stable but it's not how we wanted to be, because the lack of time and there are not too many maintainers active, we decided to publish it, we might make a new breaking changes verion * This version is quite stable but it's not how we wanted to be, because the lack of time and there are not too many maintainers active, we decided to publish it, we might make a new breaking changes verion

@ -127,7 +127,6 @@ QuillController _controller = QuillController.basic();
And then use the `QuillEditor`, `QuillToolbar` widgets, And then use the `QuillEditor`, `QuillToolbar` widgets,
connect the `QuillController` to them connect the `QuillController` to them
using `QuillProvider` inherited widget
```dart ```dart
QuillToolbar.simple( QuillToolbar.simple(

@ -47,8 +47,22 @@ class MyApp extends StatelessWidget {
builder: (context, state) { builder: (context, state) {
return MaterialApp( return MaterialApp(
title: 'Flutter Quill Demo', title: 'Flutter Quill Demo',
theme: ThemeData.light(useMaterial3: true), theme: ThemeData(
darkTheme: ThemeData.dark(useMaterial3: true), useMaterial3: true,
visualDensity: VisualDensity.adaptivePlatformDensity,
colorScheme: ColorScheme.fromSeed(
brightness: Brightness.light,
seedColor: Colors.red,
),
),
darkTheme: ThemeData(
useMaterial3: true,
visualDensity: VisualDensity.adaptivePlatformDensity,
colorScheme: ColorScheme.fromSeed(
brightness: Brightness.dark,
seedColor: Colors.red,
),
),
themeMode: state.themeMode, themeMode: state.themeMode,
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
localizationsDelegates: const [ localizationsDelegates: const [

@ -33,6 +33,22 @@ class MyQuillEditor extends StatelessWidget {
scrollController: scrollController, scrollController: scrollController,
focusNode: focusNode, focusNode: focusNode,
configurations: configurations.copyWith( configurations: configurations.copyWith(
elementOptions: const QuillEditorElementOptions(
codeBlock: QuillEditorCodeBlockElementOptions(
enableLineNumbers: true,
),
// orderedList: QuillEditorOrderedListElementOptions(
// backgroundColor: Colors.amber,
// fontColor: Colors.black,
// ),
// unorderedList: QuillEditorUnOrderedListElementOptions(
// backgroundColor: Colors.green,
// fontColor: Colors.red,
// ),
unorderedList: QuillEditorUnOrderedListElementOptions(
useTextColorForDot: false,
),
),
customStyles: const DefaultStyles( customStyles: const DefaultStyles(
h1: DefaultTextBlockStyle( h1: DefaultTextBlockStyle(
TextStyle( TextStyle(

@ -100,17 +100,10 @@ class MyQuillToolbar extends StatelessWidget {
// For more info // For more info
// https://github.com/singerdmx/flutter-quill/blob/master/doc/custom_toolbar.md // https://github.com/singerdmx/flutter-quill/blob/master/doc/custom_toolbar.md
return QuillToolbar( return QuillToolbar(
configurations: const QuillToolbarConfigurations( configurations: const QuillToolbarConfigurations(),
buttonOptions: QuillToolbarButtonOptions(
base: QuillToolbarBaseButtonOptions(
globalIconSize: 20,
globalIconButtonFactor: 1.4,
),
),
),
child: SingleChildScrollView( child: SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: Row( child: Wrap(
children: [ children: [
IconButton( IconButton(
onPressed: () => context onPressed: () => context
@ -166,7 +159,7 @@ class MyQuillToolbar extends StatelessWidget {
isBackground: true, isBackground: true,
), ),
const VerticalDivider(), const VerticalDivider(),
QuillToolbarSelectHeaderStyleButton( QuillToolbarSelectHeaderStyleDropdownButton(
controller: controller, controller: controller,
), ),
const VerticalDivider(), const VerticalDivider(),
@ -204,14 +197,24 @@ class MyQuillToolbar extends StatelessWidget {
), ),
); );
} }
return QuillSimpleToolbar( return QuillToolbar.simple(
configurations: QuillSimpleToolbarConfigurations( configurations: QuillSimpleToolbarConfigurations(
controller: controller, controller: controller,
showAlignmentButtons: true, showAlignmentButtons: true,
buttonOptions: QuillToolbarButtonOptions( buttonOptions: QuillSimpleToolbarButtonOptions(
base: QuillToolbarBaseButtonOptions( base: QuillToolbarBaseButtonOptions(
// Request editor focus when any button is pressed // Request editor focus when any button is pressed
afterButtonPressed: focusNode.requestFocus, afterButtonPressed: focusNode.requestFocus,
globalIconSize: 18,
),
selectHeaderStyleDropdownButton:
const QuillToolbarSelectHeaderStyleDropdownButtonOptions(
textStyle: TextStyle(
fontSize: 20,
),
iconTheme: QuillIconTheme(
iconSelectedColor: Colors.red,
),
), ),
), ),
customButtons: [ customButtons: [

@ -76,7 +76,7 @@ class _QuillScreenState extends State<QuillScreen> {
onPressed: () { onPressed: () {
final html = _controller.document.toDelta().toHtml(); final html = _controller.document.toDelta().toHtml();
_controller.document = _controller.document =
Document.fromDelta(QuillController.fromHtml(html)); Document.fromDelta(Document.fromHtml(html));
}, },
icon: const Icon(Icons.html), icon: const Icon(Icons.html),
), ),
@ -126,20 +126,6 @@ class _QuillScreenState extends State<QuillScreen> {
sharedConfigurations: _sharedConfigurations, sharedConfigurations: _sharedConfigurations,
controller: _controller, controller: _controller,
readOnly: _isReadOnly, readOnly: _isReadOnly,
customStyles: const DefaultStyles(),
elementOptions: const QuillEditorElementOptions(
codeBlock: QuillEditorCodeBlockElementOptions(
enableLineNumbers: true,
),
// orderedList: QuillEditorOrderedListElementOptions(
// backgroundColor: Colors.amber,
// fontColor: Colors.black,
// ),
// unorderedList: QuillEditorUnOrderedListElementOptions(
// backgroundColor: Colors.green,
// fontColor: Colors.red,
// ),
),
), ),
scrollController: _editorScrollController, scrollController: _editorScrollController,
focusNode: _editorFocusNode, focusNode: _editorFocusNode,

@ -2,6 +2,30 @@
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
* Release instead of pre-release
## 9.0.2-dev.3
* Export `QuillSingleChildScrollView`
## 9.0.2-dev.2
* Add the new translations for ru, uk arb files by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Add a new dropdown button by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Update the default style values by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Fix bug [#1562](https://github.com/singerdmx/flutter-quill/issues/1562)
* Fix the second bug of [#1480](https://github.com/singerdmx/flutter-quill/issues/1480)
## 9.0.2-dev.1
* Add configurations for the new dropdown `QuillToolbarSelectHeaderStyleButton`, you can use the orignal one or this
* Fix the [issue](https://github.com/singerdmx/flutter-quill/issues/1119) when enter is pressed, all font settings is lost
## 9.0.2-dev
* **Breaking change** Remove the spacer widget, removed the controller option for each button
* Add `toolbarRunSpacing` property to the simple toolbar
## 9.0.1
* Fix default icon size
## 9.0.0 ## 9.0.0
* This version is quite stable but it's not how we wanted to be, because the lack of time and there are not too many maintainers active, we decided to publish it, we might make a new breaking changes verion * This version is quite stable but it's not how we wanted to be, because the lack of time and there are not too many maintainers active, we decided to publish it, we might make a new breaking changes verion

@ -93,37 +93,6 @@ Expanded(
) )
``` ```
They both should have a parent `QuillProvider` in the widget tree and set properly <br>
Example:
```dart
QuillProvider(
configurations: QuillConfigurations(
controller: _controller,
sharedConfigurations: const QuillSharedConfigurations(),
),
child: Column(
children: [
QuillToolbar(
configurations: QuillToolbarConfigurations(
embedButtons: FlutterQuillEmbeds.toolbarButtons(
imageButtonOptions: QuillToolbarImageButtonOptions(),
),
),
),
Expanded(
child: QuillEditor.basic(
configurations: QuillEditorConfigurations(
padding: const EdgeInsets.all(16),
embedBuilders: kIsWeb ? FlutterQuillEmbeds.editorWebBuilders() : FlutterQuillEmbeds.editorBuilders(),
),
),
)
],
),
)
```
## Embed Blocks ## Embed Blocks
As of version [flutter_quill](https://pub.dev/packages/flutter_quill) 6.0, embed blocks are not provided by default as part of Flutter quill. Instead, it provides an interface for all the users to provide their implementations for embed blocks. Implementations for image, video, and formula embed blocks are proved in this package As of version [flutter_quill](https://pub.dev/packages/flutter_quill) 6.0, embed blocks are not provided by default as part of Flutter quill. Instead, it provides an interface for all the users to provide their implementations for embed blocks. Implementations for image, video, and formula embed blocks are proved in this package

@ -180,19 +180,19 @@ class FlutterQuillEmbeds {
if (imageButtonOptions != null) if (imageButtonOptions != null)
(controller, toolbarIconSize, iconTheme, dialogTheme) => (controller, toolbarIconSize, iconTheme, dialogTheme) =>
QuillToolbarImageButton( QuillToolbarImageButton(
controller: imageButtonOptions.controller ?? controller, controller: controller,
options: imageButtonOptions, options: imageButtonOptions,
), ),
if (videoButtonOptions != null) if (videoButtonOptions != null)
(controller, toolbarIconSize, iconTheme, dialogTheme) => (controller, toolbarIconSize, iconTheme, dialogTheme) =>
QuillToolbarVideoButton( QuillToolbarVideoButton(
controller: videoButtonOptions.controller ?? controller, controller: controller,
options: videoButtonOptions, options: videoButtonOptions,
), ),
if (cameraButtonOptions != null) if (cameraButtonOptions != null)
(controller, toolbarIconSize, iconTheme, dialogTheme) => (controller, toolbarIconSize, iconTheme, dialogTheme) =>
QuillToolbarCameraButton( QuillToolbarCameraButton(
controller: cameraButtonOptions.controller ?? controller, controller: controller,
options: cameraButtonOptions, options: cameraButtonOptions,
), ),
// TODO: We will return the support for this later // TODO: We will return the support for this later

@ -24,7 +24,6 @@ class QuillToolbarCameraButtonOptions extends QuillToolbarBaseButtonOptions<
super.tooltip, super.tooltip,
super.iconTheme, super.iconTheme,
super.childBuilder, super.childBuilder,
super.controller,
}); });
final double? iconSize; final double? iconSize;

@ -18,7 +18,6 @@ class QuillToolbarImageButtonOptions extends QuillToolbarBaseButtonOptions<
QuillToolbarImageButtonOptions, QuillToolbarImageButtonExtraOptions> { QuillToolbarImageButtonOptions, QuillToolbarImageButtonExtraOptions> {
const QuillToolbarImageButtonOptions({ const QuillToolbarImageButtonOptions({
super.iconData, super.iconData,
super.controller,
this.iconSize, this.iconSize,
this.iconButtonFactor, this.iconButtonFactor,

@ -38,7 +38,6 @@ class QuillToolbarMediaButtonOptions extends QuillToolbarBaseButtonOptions<
super.tooltip, super.tooltip,
super.iconTheme, super.iconTheme,
super.childBuilder, super.childBuilder,
super.controller,
}); });
final double? iconSize; final double? iconSize;

@ -25,7 +25,6 @@ class QuillToolbarVideoButtonOptions extends QuillToolbarBaseButtonOptions<
super.tooltip, super.tooltip,
super.iconTheme, super.iconTheme,
super.childBuilder, super.childBuilder,
super.controller,
this.videoConfigurations = const QuillToolbarVideoConfigurations(), this.videoConfigurations = const QuillToolbarVideoConfigurations(),
}); });

@ -1,6 +1,6 @@
name: flutter_quill_extensions name: flutter_quill_extensions
description: Embed extensions for flutter_quill including image, video, formula and etc. description: Embed extensions for flutter_quill including image, video, formula and etc.
version: 9.0.0 version: 9.0.2
homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/ homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/ repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

@ -2,6 +2,30 @@
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
* Release instead of pre-release
## 9.0.2-dev.3
* Export `QuillSingleChildScrollView`
## 9.0.2-dev.2
* Add the new translations for ru, uk arb files by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Add a new dropdown button by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Update the default style values by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
* Fix bug [#1562](https://github.com/singerdmx/flutter-quill/issues/1562)
* Fix the second bug of [#1480](https://github.com/singerdmx/flutter-quill/issues/1480)
## 9.0.2-dev.1
* Add configurations for the new dropdown `QuillToolbarSelectHeaderStyleButton`, you can use the orignal one or this
* Fix the [issue](https://github.com/singerdmx/flutter-quill/issues/1119) when enter is pressed, all font settings is lost
## 9.0.2-dev
* **Breaking change** Remove the spacer widget, removed the controller option for each button
* Add `toolbarRunSpacing` property to the simple toolbar
## 9.0.1
* Fix default icon size
## 9.0.0 ## 9.0.0
* This version is quite stable but it's not how we wanted to be, because the lack of time and there are not too many maintainers active, we decided to publish it, we might make a new breaking changes verion * This version is quite stable but it's not how we wanted to be, because the lack of time and there are not too many maintainers active, we decided to publish it, we might make a new breaking changes verion

@ -1,6 +1,6 @@
name: flutter_quill_test name: flutter_quill_test
description: Test utilities for flutter_quill which includes methods to simplify interacting with the editor in test cases. description: Test utilities for flutter_quill which includes methods to simplify interacting with the editor in test cases.
version: 9.0.0 version: 9.0.2
homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/ homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/ repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/ issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

@ -1,5 +1,6 @@
library flutter_quill; library flutter_quill;
export '/src/widgets/raw_editor/quill_single_child_scroll_view.dart';
export 'src/extensions/quill_configurations_ext.dart'; export 'src/extensions/quill_configurations_ext.dart';
export 'src/models/config/quill_configurations.dart'; export 'src/models/config/quill_configurations.dart';
export 'src/models/config/raw_editor/raw_editor_configurations.dart'; export 'src/models/config/raw_editor/raw_editor_configurations.dart';
@ -32,6 +33,6 @@ export 'src/widgets/raw_editor/raw_editor.dart';
export 'src/widgets/raw_editor/raw_editor_state.dart'; export 'src/widgets/raw_editor/raw_editor_state.dart';
export 'src/widgets/style_widgets/style_widgets.dart'; export 'src/widgets/style_widgets/style_widgets.dart';
export 'src/widgets/toolbar/base_toolbar.dart'; export 'src/widgets/toolbar/base_toolbar.dart';
export 'src/widgets/toolbar/buttons/hearder_style/select_header_style_button.dart'; export 'src/widgets/toolbar/buttons/hearder_style/select_header_style_dropdown_button.dart';
export 'src/widgets/toolbar/simple_toolbar.dart'; export 'src/widgets/toolbar/simple_toolbar.dart';
export 'src/widgets/utils/provider.dart'; export 'src/widgets/utils/provider.dart';

@ -445,6 +445,24 @@ abstract class FlutterQuillLocalizations {
/// **'Heading 3'** /// **'Heading 3'**
String get heading3; String get heading3;
/// No description provided for @heading4.
///
/// In en, this message translates to:
/// **'Heading 4'**
String get heading4;
/// No description provided for @heading5.
///
/// In en, this message translates to:
/// **'Heading 5'**
String get heading5;
/// No description provided for @heading6.
///
/// In en, this message translates to:
/// **'Heading 6'**
String get heading6;
/// No description provided for @numberedList. /// No description provided for @numberedList.
/// ///
/// In en, this message translates to: /// In en, this message translates to:

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsAr extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'قائمة مرقمة'; String get numberedList => 'قائمة مرقمة';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsBg extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Номериран списък'; String get numberedList => 'Номериран списък';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsBn extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'ত তি'; String get numberedList => 'ত তি';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsCs extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Číslovaný seznam'; String get numberedList => 'Číslovaný seznam';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsDa extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsDe extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Nummerierte Liste'; String get numberedList => 'Nummerierte Liste';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsEn extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsEs extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsFa extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'لیست شمارهدار'; String get numberedList => 'لیست شمارهدار';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsFr extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Liste numérotée'; String get numberedList => 'Liste numérotée';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsHe extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'רשימה ממוספרת'; String get numberedList => 'רשימה ממוספרת';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsHi extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'बदध स'; String get numberedList => 'बदध स';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsId extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Daftar Bernomor'; String get numberedList => 'Daftar Bernomor';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsIt extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Elenco numerato'; String get numberedList => 'Elenco numerato';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsJa extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => '順序付きリスト'; String get numberedList => '順序付きリスト';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsKo extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsMs extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsNl extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsNo extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Nummerert liste'; String get numberedList => 'Nummerert liste';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsPl extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsPt extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsRu extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numbered list'; String get numberedList => 'Numbered list';
@ -241,19 +250,21 @@ class FlutterQuillLocalizationsRu extends FlutterQuillLocalizations {
String get insertImage => 'Вставить изображение'; String get insertImage => 'Вставить изображение';
@override @override
String get pickAPhotoFromYourGallery => 'Pick a photo from your gallery'; String get pickAPhotoFromYourGallery => 'Выберите фотографю из вашей галереи';
@override @override
String get takeAPhotoUsingYourCamera => 'Take a photo using your camera'; String get takeAPhotoUsingYourCamera =>
'Создайте фотографю, использую фотокамеру';
@override @override
String get pasteAPhotoUsingALink => 'Paste a photo using a link'; String get pasteAPhotoUsingALink => 'Вставьте фотографию, используя ссылку';
@override @override
String get pickAVideoFromYourGallery => 'Pick a video from your gallery'; String get pickAVideoFromYourGallery => 'Выберете видео из вашей галереи';
@override @override
String get recordAVideoUsingYourCamera => 'Record a video using your camera'; String get recordAVideoUsingYourCamera =>
'Запишите видео, используя вдеокамеру';
@override @override
String get pasteAVideoUsingALink => 'Paste a video using a link'; String get pasteAVideoUsingALink => 'Paste a video using a link';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsSr extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numerisana lista'; String get numberedList => 'Numerisana lista';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsSw extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Orodha ya Nambari'; String get numberedList => 'Orodha ya Nambari';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsTk extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Sanly sanaw'; String get numberedList => 'Sanly sanaw';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsTr extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Numaralı Liste'; String get numberedList => 'Numaralı Liste';

@ -137,16 +137,25 @@ class FlutterQuillLocalizationsUk extends FlutterQuillLocalizations {
String get headerStyle => 'Стиль заголовка'; String get headerStyle => 'Стиль заголовка';
@override @override
String get normal => 'Normal'; String get normal => 'Звичайний';
@override @override
String get heading1 => 'Heading 1'; String get heading1 => 'Заголовок 1';
@override @override
String get heading2 => 'Heading 2'; String get heading2 => 'Заголовок 2';
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Заголовок 3';
@override
String get heading4 => 'Заголовок 4';
@override
String get heading5 => 'Заголовок 5';
@override
String get heading6 => 'Заголовок 6';
@override @override
String get numberedList => 'Нумерований список'; String get numberedList => 'Нумерований список';
@ -243,20 +252,23 @@ class FlutterQuillLocalizationsUk extends FlutterQuillLocalizations {
String get insertImage => 'Вставити зображення'; String get insertImage => 'Вставити зображення';
@override @override
String get pickAPhotoFromYourGallery => 'Pick a photo from your gallery'; String get pickAPhotoFromYourGallery => 'Оберіть фотографію з вашої галереї';
@override @override
String get takeAPhotoUsingYourCamera => 'Take a photo using your camera'; String get takeAPhotoUsingYourCamera =>
'Створіть фотографію, використовуючи фотокамеру';
@override @override
String get pasteAPhotoUsingALink => 'Paste a photo using a link'; String get pasteAPhotoUsingALink =>
'Вставте фотографію, використовуючи посилання';
@override @override
String get pickAVideoFromYourGallery => 'Pick a video from your gallery'; String get pickAVideoFromYourGallery => 'Оберіть відео з вашої галереї';
@override @override
String get recordAVideoUsingYourCamera => 'Record a video using your camera'; String get recordAVideoUsingYourCamera =>
'Запишіть відео, використовуючи відеокамеру';
@override @override
String get pasteAVideoUsingALink => 'Paste a video using a link'; String get pasteAVideoUsingALink => 'Вставте відео, використовуючи посилання';
} }

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsUr extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'مرقم فہرست'; String get numberedList => 'مرقم فہرست';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsVi extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => 'Danh sách có số'; String get numberedList => 'Danh sách có số';

@ -148,6 +148,15 @@ class FlutterQuillLocalizationsZh extends FlutterQuillLocalizations {
@override @override
String get heading3 => 'Heading 3'; String get heading3 => 'Heading 3';
@override
String get heading4 => 'Heading 4';
@override
String get heading5 => 'Heading 5';
@override
String get heading6 => 'Heading 6';
@override @override
String get numberedList => '编号列表'; String get numberedList => '编号列表';

@ -48,6 +48,9 @@
"heading1": "Heading 1", "heading1": "Heading 1",
"heading2": "Heading 2", "heading2": "Heading 2",
"heading3": "Heading 3", "heading3": "Heading 3",
"heading4": "Heading 4",
"heading5": "Heading 5",
"heading6": "Heading 6",
"numberedList": "Numbered list", "numberedList": "Numbered list",
"bulletList": "Bullet list", "bulletList": "Bullet list",
"checkedList": "Checked list", "checkedList": "Checked list",

@ -73,6 +73,11 @@
"photo": "Фото", "photo": "Фото",
"image": "Изображение", "image": "Изображение",
"caseSensitivityAndWholeWordSearch": "Чувствительность к регистру и поиск целых слов", "caseSensitivityAndWholeWordSearch": "Чувствительность к регистру и поиск целых слов",
"insertImage": "Вставить изображение" "insertImage": "Вставить изображение",
"pickAPhotoFromYourGallery": "Выберите фотографю из вашей галереи",
"takeAPhotoUsingYourCamera": "Создайте фотографю, использую фотокамеру",
"pasteAPhotoUsingALink": "Вставьте фотографию, используя ссылку",
"pickAVideoFromYourGallery": "Выберете видео из вашей галереи",
"recordAVideoUsingYourCamera": "Запишите видео, используя вдеокамеру"
} }

@ -73,6 +73,19 @@
"errorWhileSavingImage": "Помилка при збереженні зображення", "errorWhileSavingImage": "Помилка при збереженні зображення",
"pleaseEnterTextForYourLink": "Наприклад, 'Дізнатися більше'", "pleaseEnterTextForYourLink": "Наприклад, 'Дізнатися більше'",
"pleaseEnterTheLinkURL": "Наприклад, 'https://example.com'", "pleaseEnterTheLinkURL": "Наприклад, 'https://example.com'",
"pleaseEnterAValidImageURL": "Будь ласка, введіть правильний URL-адресу зображення" "pleaseEnterAValidImageURL": "Будь ласка, введіть правильний URL-адресу зображення",
"pickAPhotoFromYourGallery": "Оберіть фотографію з вашої галереї",
"takeAPhotoUsingYourCamera": "Створіть фотографію, використовуючи фотокамеру",
"pasteAPhotoUsingALink": "Вставте фотографію, використовуючи посилання",
"pickAVideoFromYourGallery": "Оберіть відео з вашої галереї",
"recordAVideoUsingYourCamera": "Запишіть відео, використовуючи відеокамеру",
"pasteAVideoUsingALink": "Вставте відео, використовуючи посилання",
"normal": "Звичайний",
"heading1": "Заголовок 1",
"heading2": "Заголовок 2",
"heading3": "Заголовок 3",
"heading4": "Заголовок 4",
"heading5": "Заголовок 5",
"heading6": "Заголовок 6"
} }

@ -4,6 +4,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -17,6 +20,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -30,6 +36,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -43,6 +52,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -56,6 +68,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -69,6 +84,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -82,6 +100,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -95,6 +116,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -108,6 +132,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -121,6 +148,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -134,6 +164,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -147,6 +180,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -160,6 +196,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -173,6 +212,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -186,6 +228,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -199,6 +244,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -212,6 +260,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -225,6 +276,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -238,6 +292,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -251,6 +308,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -264,6 +324,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -277,6 +340,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -290,11 +356,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"pickAPhotoFromYourGallery", "heading4",
"takeAPhotoUsingYourCamera", "heading5",
"pasteAPhotoUsingALink", "heading6",
"pickAVideoFromYourGallery",
"recordAVideoUsingYourCamera",
"pasteAVideoUsingALink" "pasteAVideoUsingALink"
], ],
@ -303,6 +367,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -316,6 +383,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -329,6 +399,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -342,19 +415,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"pickAPhotoFromYourGallery", "heading4",
"takeAPhotoUsingYourCamera", "heading5",
"pasteAPhotoUsingALink", "heading6",
"pickAVideoFromYourGallery",
"recordAVideoUsingYourCamera",
"pasteAVideoUsingALink"
],
"uk": [
"normal",
"heading1",
"heading2",
"heading3",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -368,6 +431,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -381,6 +447,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -394,6 +463,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -407,6 +479,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",
@ -420,6 +495,9 @@
"heading1", "heading1",
"heading2", "heading2",
"heading3", "heading3",
"heading4",
"heading5",
"heading6",
"pickAPhotoFromYourGallery", "pickAPhotoFromYourGallery",
"takeAPhotoUsingYourCamera", "takeAPhotoUsingYourCamera",
"pasteAPhotoUsingALink", "pasteAPhotoUsingALink",

@ -1,14 +1,13 @@
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' show Color;
@immutable @immutable
class QuillEditorOrderedListElementOptions extends Equatable { class QuillEditorOrderedListElementOptions extends Equatable {
const QuillEditorOrderedListElementOptions( const QuillEditorOrderedListElementOptions({
{this.backgroundColor, this.fontColor}); this.useTextColorForDot = true,
});
final Color? backgroundColor; final bool useTextColorForDot;
final Color? fontColor;
@override @override
List<Object?> get props => []; List<Object?> get props => [];
} }

@ -1,14 +1,13 @@
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' show Color;
@immutable @immutable
class QuillEditorUnOrderedListElementOptions extends Equatable { class QuillEditorUnOrderedListElementOptions extends Equatable {
const QuillEditorUnOrderedListElementOptions( const QuillEditorUnOrderedListElementOptions({
{this.backgroundColor, this.fontColor}); this.useTextColorForDot = true,
});
final Color? backgroundColor; final bool useTextColorForDot;
final Color? fontColor;
@override @override
List<Object?> get props => []; List<Object?> get props => [];
} }

@ -2,10 +2,9 @@ import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart' show VoidCallback, immutable; import 'package:flutter/foundation.dart' show VoidCallback, immutable;
import 'package:flutter/widgets.dart' show BuildContext, IconData, Widget; import 'package:flutter/widgets.dart' show BuildContext, IconData, Widget;
import '../../../../../flutter_quill.dart' show QuillController; import '../../../../flutter_quill.dart' show QuillController;
import '../../../themes/quill_icon_theme.dart' show QuillIconTheme; import '../../themes/quill_icon_theme.dart' show QuillIconTheme;
import '../../quill_configurations.dart' import '../quill_configurations.dart' show kDefaultIconSize, kIconButtonFactor;
show kDefaultIconSize, kIconButtonFactor;
class QuillToolbarBaseButtonExtraOptionsIsToggled extends Equatable { class QuillToolbarBaseButtonExtraOptionsIsToggled extends Equatable {
const QuillToolbarBaseButtonExtraOptionsIsToggled(this.isToggled); const QuillToolbarBaseButtonExtraOptionsIsToggled(this.isToggled);
@ -52,7 +51,6 @@ class QuillToolbarBaseButtonOptions<T, I> extends Equatable {
this.tooltip, this.tooltip,
this.iconTheme, this.iconTheme,
this.childBuilder, this.childBuilder,
this.controller,
}); });
/// By default it will use a Icon data from Icons which comes from material /// By default it will use a Icon data from Icons which comes from material
@ -81,13 +79,6 @@ class QuillToolbarBaseButtonOptions<T, I> extends Equatable {
/// If you want to dispaly a differnet widget based using a builder /// If you want to dispaly a differnet widget based using a builder
final QuillToolbarButtonOptionsChildBuilder<T, I> childBuilder; final QuillToolbarButtonOptionsChildBuilder<T, I> childBuilder;
/// By default it will be from the one in [QuillEditor] or [QuillToolbar]
/// To override it you must pass not null controller
/// if you wish to use the controller in the [childBuilder], please use the
/// one from the extraOptions since it will be not null and will be the one
/// which will be used from the quill toolbar
final QuillController? controller;
@override @override
List<Object?> get props => [ List<Object?> get props => [
iconData, iconData,
@ -96,7 +87,6 @@ class QuillToolbarBaseButtonOptions<T, I> extends Equatable {
tooltip, tooltip,
iconTheme, iconTheme,
childBuilder, childBuilder,
controller,
]; ];
} }

@ -16,7 +16,6 @@ class QuillToolbarClearFormatButtonOptions
super.iconData, super.iconData,
super.afterButtonPressed, super.afterButtonPressed,
super.childBuilder, super.childBuilder,
super.controller,
super.iconTheme, super.iconTheme,
super.tooltip, super.tooltip,
this.iconSize, this.iconSize,

@ -2,7 +2,7 @@ import 'package:flutter/widgets.dart' show Color;
import '../../../../widgets/quill/quill_controller.dart'; import '../../../../widgets/quill/quill_controller.dart';
import '../../quill_shared_configurations.dart' show QuillSharedConfigurations; import '../../quill_shared_configurations.dart' show QuillSharedConfigurations;
import 'base_configurations.dart'; import '../base_button_configurations.dart';
class QuillToolbarColorButtonExtraOptions class QuillToolbarColorButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions { extends QuillToolbarBaseButtonExtraOptions {
@ -31,7 +31,6 @@ class QuillToolbarColorButtonOptions extends QuillToolbarBaseButtonOptions<
super.iconData, super.iconData,
super.afterButtonPressed, super.afterButtonPressed,
super.childBuilder, super.childBuilder,
super.controller,
super.iconTheme, super.iconTheme,
super.tooltip, super.tooltip,
this.customOnPressedCallback, this.customOnPressedCallback,

@ -1,6 +1,6 @@
import 'package:flutter/widgets.dart' show VoidCallback, Widget; import 'package:flutter/widgets.dart' show VoidCallback, Widget;
import 'base_configurations.dart'; import '../base_button_configurations.dart';
class QuillToolbarCustomButtonExtraOptions class QuillToolbarCustomButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions { extends QuillToolbarBaseButtonExtraOptions {
@ -21,7 +21,6 @@ class QuillToolbarCustomButtonOptions extends QuillToolbarBaseButtonOptions<
super.tooltip, super.tooltip,
super.iconTheme, super.iconTheme,
super.childBuilder, super.childBuilder,
super.controller,
this.onPressed, this.onPressed,
}); });

@ -33,7 +33,6 @@ class QuillToolbarFontFamilyButtonOptions extends QuillToolbarBaseButtonOptions<
const QuillToolbarFontFamilyButtonOptions({ const QuillToolbarFontFamilyButtonOptions({
this.attribute = Attribute.font, this.attribute = Attribute.font,
this.rawItemsMap, this.rawItemsMap,
super.controller,
super.iconData, super.iconData,
super.afterButtonPressed, super.afterButtonPressed,
super.tooltip, super.tooltip,
@ -92,8 +91,6 @@ class QuillToolbarFontFamilyButtonOptions extends QuillToolbarBaseButtonOptions<
Color? defaultItemColor, Color? defaultItemColor,
double? iconSize, double? iconSize,
double? iconButtonFactor, double? iconButtonFactor,
// Add properties to override inherited properties
QuillController? controller,
IconData? iconData, IconData? iconData,
VoidCallback? afterButtonPressed, VoidCallback? afterButtonPressed,
String? tooltip, String? tooltip,
@ -102,7 +99,6 @@ class QuillToolbarFontFamilyButtonOptions extends QuillToolbarBaseButtonOptions<
return QuillToolbarFontFamilyButtonOptions( return QuillToolbarFontFamilyButtonOptions(
attribute: attribute ?? this.attribute, attribute: attribute ?? this.attribute,
rawItemsMap: rawItemsMap ?? this.rawItemsMap, rawItemsMap: rawItemsMap ?? this.rawItemsMap,
controller: controller ?? this.controller,
iconData: iconData ?? this.iconData, iconData: iconData ?? this.iconData,
afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed, afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed,
tooltip: tooltip ?? this.tooltip, tooltip: tooltip ?? this.tooltip,

@ -12,7 +12,6 @@ import 'package:flutter/widgets.dart'
TextOverflow, TextOverflow,
TextStyle; TextStyle;
import '../../../../widgets/quill/quill_controller.dart';
import '../../../documents/attribute.dart'; import '../../../documents/attribute.dart';
import '../../quill_configurations.dart'; import '../../quill_configurations.dart';
@ -39,7 +38,6 @@ class QuillToolbarFontSizeButtonOptions extends QuillToolbarBaseButtonOptions<
this.rawItemsMap, this.rawItemsMap,
this.onSelected, this.onSelected,
this.attribute = Attribute.size, this.attribute = Attribute.size,
super.controller,
super.afterButtonPressed, super.afterButtonPressed,
super.tooltip, super.tooltip,
this.padding, this.padding,
@ -93,7 +91,6 @@ class QuillToolbarFontSizeButtonOptions extends QuillToolbarBaseButtonOptions<
Color? defaultItemColor, Color? defaultItemColor,
VoidCallback? afterButtonPressed, VoidCallback? afterButtonPressed,
String? tooltip, String? tooltip,
QuillController? controller,
OutlinedBorder? shape, OutlinedBorder? shape,
}) { }) {
return QuillToolbarFontSizeButtonOptions( return QuillToolbarFontSizeButtonOptions(
@ -112,7 +109,6 @@ class QuillToolbarFontSizeButtonOptions extends QuillToolbarBaseButtonOptions<
defaultItemColor: defaultItemColor ?? this.defaultItemColor, defaultItemColor: defaultItemColor ?? this.defaultItemColor,
tooltip: tooltip ?? super.tooltip, tooltip: tooltip ?? super.tooltip,
afterButtonPressed: afterButtonPressed ?? super.afterButtonPressed, afterButtonPressed: afterButtonPressed ?? super.afterButtonPressed,
controller: controller ?? super.controller,
); );
} }
} }

@ -21,7 +21,6 @@ class QuillToolbarHistoryButtonOptions extends QuillToolbarBaseButtonOptions<
QuillToolbarHistoryButtonOptions, QuillToolbarHistoryButtonExtraOptions> { QuillToolbarHistoryButtonOptions, QuillToolbarHistoryButtonExtraOptions> {
const QuillToolbarHistoryButtonOptions({ const QuillToolbarHistoryButtonOptions({
super.iconData, super.iconData,
super.controller,
super.iconTheme, super.iconTheme,
super.afterButtonPressed, super.afterButtonPressed,
super.tooltip, super.tooltip,

@ -1,6 +1,6 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'base_configurations.dart'; import '../base_button_configurations.dart';
class QuillToolbarIndentButtonExtraOptions class QuillToolbarIndentButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions { extends QuillToolbarBaseButtonExtraOptions {
@ -18,7 +18,6 @@ class QuillToolbarIndentButtonOptions extends QuillToolbarBaseButtonOptions<
super.iconData, super.iconData,
super.afterButtonPressed, super.afterButtonPressed,
super.childBuilder, super.childBuilder,
super.controller,
super.iconTheme, super.iconTheme,
super.tooltip, super.tooltip,
this.iconSize, this.iconSize,

@ -1,7 +1,7 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import '../../../themes/quill_dialog_theme.dart'; import '../../../themes/quill_dialog_theme.dart';
import 'base_configurations.dart'; import '../base_button_configurations.dart';
class QuillToolbarLinkStyleButton2ExtraOptions class QuillToolbarLinkStyleButton2ExtraOptions
extends QuillToolbarBaseButtonExtraOptions { extends QuillToolbarBaseButtonExtraOptions {
@ -33,7 +33,6 @@ class QuillToolbarLinkStyleButton2Options extends QuillToolbarBaseButtonOptions<
super.tooltip, super.tooltip,
super.iconTheme, super.iconTheme,
super.childBuilder, super.childBuilder,
super.controller,
}); });
final double? iconSize; final double? iconSize;

@ -29,7 +29,6 @@ class QuillToolbarLinkStyleButtonOptions extends QuillToolbarBaseButtonOptions<
super.tooltip, super.tooltip,
super.iconTheme, super.iconTheme,
super.childBuilder, super.childBuilder,
super.controller,
}); });
final double? iconSize; final double? iconSize;

@ -14,7 +14,6 @@ class QuillToolbarSearchButtonExtraOptions
class QuillToolbarSearchButtonOptions extends QuillToolbarBaseButtonOptions { class QuillToolbarSearchButtonOptions extends QuillToolbarBaseButtonOptions {
const QuillToolbarSearchButtonOptions({ const QuillToolbarSearchButtonOptions({
super.iconData, super.iconData,
super.controller,
super.childBuilder, super.childBuilder,
super.tooltip, super.tooltip,
super.afterButtonPressed, super.afterButtonPressed,

@ -1,5 +1,5 @@
import 'package:flutter/widgets.dart' show IconData, immutable; import 'package:flutter/widgets.dart' show IconData, immutable;
import 'base_configurations.dart'; import '../base_button_configurations.dart';
class QuillToolbarSelectAlignmentButtonExtraOptions class QuillToolbarSelectAlignmentButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions { extends QuillToolbarBaseButtonExtraOptions {
@ -23,7 +23,6 @@ class QuillToolbarSelectAlignmentButtonOptions
/// This will called on every select alignment button /// This will called on every select alignment button
super.childBuilder, super.childBuilder,
super.controller,
super.iconTheme, super.iconTheme,
}); });
final double? iconSize; final double? iconSize;

@ -3,9 +3,9 @@ import 'package:flutter/widgets.dart' show Axis;
import '../../../../widgets/toolbar/base_toolbar.dart'; import '../../../../widgets/toolbar/base_toolbar.dart';
import '../../../documents/attribute.dart'; import '../../../documents/attribute.dart';
class QuillToolbarSelectHeaderStyleButtonExtraOptions class QuillToolbarSelectHeaderStyleButtonsExtraOptions
extends QuillToolbarBaseButtonExtraOptions { extends QuillToolbarBaseButtonExtraOptions {
const QuillToolbarSelectHeaderStyleButtonExtraOptions({ const QuillToolbarSelectHeaderStyleButtonsExtraOptions({
required super.controller, required super.controller,
required super.context, required super.context,
required super.onPressed, required super.onPressed,
@ -15,11 +15,10 @@ class QuillToolbarSelectHeaderStyleButtonExtraOptions
class QuillToolbarSelectHeaderStyleButtonsOptions class QuillToolbarSelectHeaderStyleButtonsOptions
extends QuillToolbarBaseButtonOptions< extends QuillToolbarBaseButtonOptions<
QuillToolbarSelectHeaderStyleButtonsOptions, QuillToolbarSelectHeaderStyleButtonsOptions,
QuillToolbarSelectHeaderStyleButtonExtraOptions> { QuillToolbarSelectHeaderStyleButtonsExtraOptions> {
const QuillToolbarSelectHeaderStyleButtonsOptions({ const QuillToolbarSelectHeaderStyleButtonsOptions({
super.afterButtonPressed, super.afterButtonPressed,
super.childBuilder, super.childBuilder,
super.controller,
super.iconTheme, super.iconTheme,
super.tooltip, super.tooltip,
this.axis, this.axis,
@ -29,12 +28,15 @@ class QuillToolbarSelectHeaderStyleButtonsOptions
}); });
/// Default value: /// Default value:
///
/// ```dart
/// const [ /// const [
/// Attribute.header, /// Attribute.header,
/// Attribute.h1, /// Attribute.h1,
/// Attribute.h2, /// Attribute.h2,
/// Attribute.h3, /// Attribute.h3,
/// ] /// ]
/// ```
final List<Attribute>? attributes; final List<Attribute>? attributes;
/// By default we will the toolbar axis from [QuillSimpleToolbarConfigurations] /// By default we will the toolbar axis from [QuillSimpleToolbarConfigurations]

@ -0,0 +1,134 @@
import 'package:flutter/material.dart' show PopupMenuEntry;
import 'package:flutter/widgets.dart'
show
Color,
EdgeInsets,
EdgeInsetsGeometry,
IconData,
TextOverflow,
TextStyle,
ValueChanged,
VoidCallback;
import '../../../../widgets/toolbar/base_toolbar.dart';
import '../../../documents/attribute.dart';
import '../../../themes/quill_icon_theme.dart';
class QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions {
const QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions({
required super.controller,
required super.context,
required super.onPressed,
required this.currentValue,
});
final Attribute currentValue;
}
class QuillToolbarSelectHeaderStyleDropdownButtonOptions
extends QuillToolbarBaseButtonOptions<
QuillToolbarSelectHeaderStyleDropdownButtonOptions,
QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions> {
const QuillToolbarSelectHeaderStyleDropdownButtonOptions({
super.afterButtonPressed,
super.childBuilder,
super.iconTheme,
super.tooltip,
this.iconSize,
this.iconButtonFactor,
this.textStyle,
super.iconData,
this.fillColor,
this.hoverElevation = 1,
this.highlightElevation = 1,
this.onSelected,
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]
final double? iconSize;
final double? iconButtonFactor;
final TextStyle? textStyle;
final Color? fillColor;
final double hoverElevation;
final double highlightElevation;
final ValueChanged<String>? onSelected;
/// Header attributes, defaults to:
/// ```dart
/// [
/// Attribute.h1,
/// Attribute.h2,
/// Attribute.h3,
/// Attribute.h4,
/// Attribute.h5,
/// Attribute.h6,
/// Attribute.header,
/// ]
/// ```
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({
Color? fillColor,
double? hoverElevation,
double? highlightElevation,
List<PopupMenuEntry<String>>? items,
ValueChanged<String>? onSelected,
List<Attribute<int>>? attributes,
EdgeInsetsGeometry? padding,
TextStyle? style,
double? width,
TextOverflow? labelOverflow,
bool? renderFontFamilies,
bool? overrideTooltipByFontFamily,
double? itemHeight,
EdgeInsets? itemPadding,
Color? defaultItemColor,
double? iconSize,
double? iconButtonFactor,
IconData? iconData,
VoidCallback? afterButtonPressed,
String? tooltip,
QuillIconTheme? iconTheme,
bool? renderItemTextStyle,
}) {
return QuillToolbarSelectHeaderStyleDropdownButtonOptions(
attributes: attributes ?? this.attributes,
iconData: iconData ?? this.iconData,
afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed,
tooltip: tooltip ?? this.tooltip,
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,
iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor,
fillColor: fillColor ?? this.fillColor,
hoverElevation: hoverElevation ?? this.hoverElevation,
highlightElevation: highlightElevation ?? this.highlightElevation,
renderItemTextStyle: renderItemTextStyle ?? this.renderItemTextStyle,
);
}
}

@ -26,7 +26,6 @@ class QuillToolbarToggleCheckListButtonOptions
this.fillColor, this.fillColor,
this.attribute = Attribute.unchecked, this.attribute = Attribute.unchecked,
this.isShouldRequestKeyboard = false, this.isShouldRequestKeyboard = false,
super.controller,
super.iconTheme, super.iconTheme,
super.tooltip, super.tooltip,
super.iconData, super.iconData,

@ -2,7 +2,7 @@
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' show Color; import 'package:flutter/widgets.dart' show Color;
import 'base_configurations.dart'; import '../base_button_configurations.dart';
class QuillToolbarToggleStyleButtonExtraOptions class QuillToolbarToggleStyleButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions extends QuillToolbarBaseButtonExtraOptions
@ -31,7 +31,6 @@ class QuillToolbarToggleStyleButtonOptions
super.afterButtonPressed, super.afterButtonPressed,
super.iconTheme, super.iconTheme,
super.childBuilder, super.childBuilder,
super.controller,
}); });
final double? iconSize; final double? iconSize;

@ -0,0 +1,136 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart' show immutable;
import 'base_button_configurations.dart';
import 'buttons/clear_format_configurations.dart';
import 'buttons/color_configurations.dart';
import 'buttons/custom_button_configurations.dart';
import 'buttons/font_family_configurations.dart';
import 'buttons/font_size_configurations.dart';
import 'buttons/history_configurations.dart';
import 'buttons/indent_configurations.dart';
import 'buttons/link_style2_configurations.dart';
import 'buttons/link_style_configurations.dart';
import 'buttons/search_configurations.dart';
import 'buttons/select_alignment_configurations.dart';
import 'buttons/select_header_style_buttons_configurations.dart';
import 'buttons/select_header_style_dropdown_button_configurations.dart';
import 'buttons/toggle_check_list_configurations.dart';
import 'buttons/toggle_style_configurations.dart';
export './../../../widgets/toolbar/buttons/search/search_dialog.dart';
export 'base_button_configurations.dart';
export 'buttons/clear_format_configurations.dart';
export 'buttons/color_configurations.dart';
export 'buttons/custom_button_configurations.dart';
export 'buttons/font_family_configurations.dart';
export 'buttons/font_size_configurations.dart';
export 'buttons/history_configurations.dart';
export 'buttons/indent_configurations.dart';
export 'buttons/link_style2_configurations.dart';
export 'buttons/link_style_configurations.dart';
export 'buttons/search_configurations.dart';
export 'buttons/select_alignment_configurations.dart';
export 'buttons/select_header_style_buttons_configurations.dart';
export 'buttons/select_header_style_dropdown_button_configurations.dart';
export 'buttons/toggle_check_list_configurations.dart';
export 'buttons/toggle_style_configurations.dart';
/// The configurations for the buttons of the toolbar widget of flutter quill
@immutable
class QuillSimpleToolbarButtonOptions extends Equatable {
const QuillSimpleToolbarButtonOptions({
this.base = const QuillToolbarBaseButtonOptions(),
this.undoHistory = const QuillToolbarHistoryButtonOptions(),
this.redoHistory = const QuillToolbarHistoryButtonOptions(),
this.fontFamily = const QuillToolbarFontFamilyButtonOptions(),
this.fontSize = const QuillToolbarFontSizeButtonOptions(),
this.bold = const QuillToolbarToggleStyleButtonOptions(),
this.subscript = const QuillToolbarToggleStyleButtonOptions(),
this.superscript = const QuillToolbarToggleStyleButtonOptions(),
this.italic = const QuillToolbarToggleStyleButtonOptions(),
this.small = const QuillToolbarToggleStyleButtonOptions(),
this.underLine = const QuillToolbarToggleStyleButtonOptions(),
this.strikeThrough = const QuillToolbarToggleStyleButtonOptions(),
this.inlineCode = const QuillToolbarToggleStyleButtonOptions(),
this.direction = const QuillToolbarToggleStyleButtonOptions(),
this.listNumbers = const QuillToolbarToggleStyleButtonOptions(),
this.listBullets = const QuillToolbarToggleStyleButtonOptions(),
this.codeBlock = const QuillToolbarToggleStyleButtonOptions(),
this.quote = const QuillToolbarToggleStyleButtonOptions(),
this.toggleCheckList = const QuillToolbarToggleCheckListButtonOptions(),
this.indentIncrease = const QuillToolbarIndentButtonOptions(),
this.indentDecrease = const QuillToolbarIndentButtonOptions(),
this.color = const QuillToolbarColorButtonOptions(),
this.backgroundColor = const QuillToolbarColorButtonOptions(),
this.clearFormat = const QuillToolbarClearFormatButtonOptions(),
this.selectAlignmentButtons =
const QuillToolbarSelectAlignmentButtonOptions(),
this.search = const QuillToolbarSearchButtonOptions(),
this.selectHeaderStyleButtons =
const QuillToolbarSelectHeaderStyleButtonsOptions(),
this.selectHeaderStyleDropdownButton =
const QuillToolbarSelectHeaderStyleDropdownButtonOptions(),
this.linkStyle = const QuillToolbarLinkStyleButtonOptions(),
this.linkStyle2 = const QuillToolbarLinkStyleButton2Options(),
this.customButtons = const QuillToolbarCustomButtonOptions(),
});
/// The base configurations for all the buttons which will apply to all
/// but if the options overrided in the spesefic button options
/// then it will use that instead
final QuillToolbarBaseButtonOptions base;
final QuillToolbarHistoryButtonOptions undoHistory;
final QuillToolbarHistoryButtonOptions redoHistory;
final QuillToolbarFontFamilyButtonOptions fontFamily;
final QuillToolbarFontSizeButtonOptions fontSize;
final QuillToolbarToggleStyleButtonOptions bold;
final QuillToolbarToggleStyleButtonOptions subscript;
final QuillToolbarToggleStyleButtonOptions superscript;
final QuillToolbarToggleStyleButtonOptions italic;
final QuillToolbarToggleStyleButtonOptions small;
final QuillToolbarToggleStyleButtonOptions underLine;
final QuillToolbarToggleStyleButtonOptions strikeThrough;
final QuillToolbarToggleStyleButtonOptions inlineCode;
final QuillToolbarToggleStyleButtonOptions direction;
final QuillToolbarToggleStyleButtonOptions listNumbers;
final QuillToolbarToggleStyleButtonOptions listBullets;
final QuillToolbarToggleStyleButtonOptions codeBlock;
final QuillToolbarToggleStyleButtonOptions quote;
final QuillToolbarToggleCheckListButtonOptions toggleCheckList;
final QuillToolbarIndentButtonOptions indentIncrease;
final QuillToolbarIndentButtonOptions indentDecrease;
final QuillToolbarColorButtonOptions color;
final QuillToolbarColorButtonOptions backgroundColor;
final QuillToolbarClearFormatButtonOptions clearFormat;
/// The reason we call this buttons in the end because this is responsible
/// for all the alignment buttons and not just one, you still
/// can customize the icons and tooltips
/// and you have child builder
final QuillToolbarSelectAlignmentButtonOptions selectAlignmentButtons;
final QuillToolbarSearchButtonOptions search;
/// The reason we call this buttons in the end because this is responsible
/// for all the header style buttons and not just one, you still
/// can customize it and you also have child builder
final QuillToolbarSelectHeaderStyleButtonsOptions selectHeaderStyleButtons;
/// The reason we call this buttons in the end because this is responsible
/// for all the header style buttons and not just one, you still
/// can customize it and you also have child builder
final QuillToolbarSelectHeaderStyleDropdownButtonOptions
selectHeaderStyleDropdownButton;
final QuillToolbarLinkStyleButtonOptions linkStyle;
final QuillToolbarLinkStyleButton2Options linkStyle2;
final QuillToolbarCustomButtonOptions customButtons;
@override
List<Object?> get props => [
base,
];
}

@ -1,32 +1,16 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' import 'package:flutter/widgets.dart'
show Axis, Widget, WrapAlignment, WrapCrossAlignment; show Axis, WrapAlignment, WrapCrossAlignment;
import '../../../widgets/quill/embeds.dart'; import '../../../widgets/quill/embeds.dart';
import '../../../widgets/quill/quill_controller.dart'; import '../../../widgets/quill/quill_controller.dart';
import '../../themes/quill_dialog_theme.dart'; import '../../themes/quill_dialog_theme.dart';
import '../../themes/quill_icon_theme.dart'; import '../../themes/quill_icon_theme.dart';
import 'buttons/base_configurations.dart'; import 'simple_toolbar_button_options.dart';
import 'buttons/clear_format_configurations.dart';
import 'buttons/color_configurations.dart';
import 'buttons/custom_button_configurations.dart';
import 'buttons/font_family_configurations.dart';
import 'buttons/font_size_configurations.dart';
import 'buttons/history_configurations.dart';
import 'buttons/indent_configurations.dart';
import 'buttons/link_style2_configurations.dart';
import 'buttons/link_style_configurations.dart';
import 'buttons/search_configurations.dart';
import 'buttons/select_alignment_configurations.dart';
import 'buttons/select_header_style_configurations.dart';
import 'buttons/toggle_check_list_configurations.dart';
import 'buttons/toggle_style_configurations.dart';
import 'toolbar_shared_configurations.dart'; import 'toolbar_shared_configurations.dart';
export './../../../widgets/toolbar/buttons/search/search_dialog.dart'; export './../../../widgets/toolbar/buttons/search/search_dialog.dart';
export 'buttons/base_configurations.dart'; export 'base_button_configurations.dart';
export 'buttons/clear_format_configurations.dart'; export 'buttons/clear_format_configurations.dart';
export 'buttons/color_configurations.dart'; export 'buttons/color_configurations.dart';
export 'buttons/custom_button_configurations.dart'; export 'buttons/custom_button_configurations.dart';
@ -38,12 +22,14 @@ export 'buttons/link_style2_configurations.dart';
export 'buttons/link_style_configurations.dart'; export 'buttons/link_style_configurations.dart';
export 'buttons/search_configurations.dart'; export 'buttons/search_configurations.dart';
export 'buttons/select_alignment_configurations.dart'; export 'buttons/select_alignment_configurations.dart';
export 'buttons/select_header_style_configurations.dart'; export 'buttons/select_header_style_buttons_configurations.dart';
export 'buttons/select_header_style_dropdown_button_configurations.dart';
export 'buttons/toggle_check_list_configurations.dart'; export 'buttons/toggle_check_list_configurations.dart';
export 'buttons/toggle_style_configurations.dart'; export 'buttons/toggle_style_configurations.dart';
export 'simple_toolbar_button_options.dart';
/// The default size of the icon of a button. /// The default size of the icon of a button.
const double kDefaultIconSize = 18; const double kDefaultIconSize = 15;
/// The default size for the toolbar (width, height) /// The default size for the toolbar (width, height)
const double defaultToolbarSize = kDefaultIconSize * 2; const double defaultToolbarSize = kDefaultIconSize * 2;
@ -65,6 +51,17 @@ enum LinkStyleType {
bool get isAlternative => this == LinkStyleType.alternative; bool get isAlternative => this == LinkStyleType.alternative;
} }
enum HeaderStyleType {
/// Defines the original [QuillToolbarSelectHeaderStyleButtons].
original,
/// Defines the alternative [QuillToolbarSelectHeaderStyleDropdownButton].
dropdown;
bool get isOriginal => this == HeaderStyleType.original;
bool get isDropdown => this == HeaderStyleType.dropdown;
}
/// The configurations for the toolbar widget of flutter quill /// The configurations for the toolbar widget of flutter quill
@immutable @immutable
class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties { class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
@ -74,7 +71,7 @@ class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
super.toolbarSectionSpacing = kToolbarSectionSpacing, super.toolbarSectionSpacing = kToolbarSectionSpacing,
super.toolbarIconAlignment = WrapAlignment.center, super.toolbarIconAlignment = WrapAlignment.center,
super.toolbarIconCrossAlignment = WrapCrossAlignment.center, super.toolbarIconCrossAlignment = WrapCrossAlignment.center,
super.buttonOptions = const QuillToolbarButtonOptions(), super.buttonOptions = const QuillSimpleToolbarButtonOptions(),
this.customButtons = const [], this.customButtons = const [],
this.fontFamilyValues, this.fontFamilyValues,
super.multiRowsDisplay = true, super.multiRowsDisplay = true,
@ -111,6 +108,7 @@ class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
this.showSubscript = true, this.showSubscript = true,
this.showSuperscript = true, this.showSuperscript = true,
this.linkStyleType = LinkStyleType.original, this.linkStyleType = LinkStyleType.original,
this.headerStyleType = HeaderStyleType.original,
/// The decoration to use for the toolbar. /// The decoration to use for the toolbar.
super.decoration, super.decoration,
@ -126,7 +124,6 @@ class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
super.color, super.color,
super.sectionDividerColor, super.sectionDividerColor,
super.sectionDividerSpace, super.sectionDividerSpace,
this.spacerWidget,
/// By default it will calculated based on the [globalIconSize] from /// By default it will calculated based on the [globalIconSize] from
/// [base] in [QuillToolbarButtonOptions] /// [base] in [QuillToolbarButtonOptions]
@ -152,17 +149,8 @@ class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
final QuillController controller; final QuillController controller;
/// A widget that will placed between each button in the toolbar
/// can be used as a spacer
/// it will not used before the first button
/// it will not used after the last button
/// it will also not used in the toolbar dividers
/// Default value will be [SizedBox.shrink()]
/// some widgets like the header styles will be considered as one widget
final Widget? spacerWidget;
/// By default it will be /// By default it will be
/// ``` /// ```dart
/// { /// {
/// 'Small'.i18n: 'small', /// 'Small'.i18n: 'small',
/// 'Large'.i18n: 'large', /// 'Large'.i18n: 'large',
@ -221,6 +209,9 @@ class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
/// Defines which dialog is used for applying link attribute. /// Defines which dialog is used for applying link attribute.
final LinkStyleType linkStyleType; final LinkStyleType linkStyleType;
/// Defines which dialog is used for applying header attribute.
final HeaderStyleType headerStyleType;
@override @override
List<Object?> get props => [ List<Object?> get props => [
buttonOptions, buttonOptions,
@ -230,93 +221,3 @@ class QuillSimpleToolbarConfigurations extends QuillSharedToolbarProperties {
axis, axis,
]; ];
} }
/// The configurations for the buttons of the toolbar widget of flutter quill
@immutable
class QuillToolbarButtonOptions extends Equatable {
const QuillToolbarButtonOptions({
this.base = const QuillToolbarBaseButtonOptions(),
this.undoHistory = const QuillToolbarHistoryButtonOptions(),
this.redoHistory = const QuillToolbarHistoryButtonOptions(),
this.fontFamily = const QuillToolbarFontFamilyButtonOptions(),
this.fontSize = const QuillToolbarFontSizeButtonOptions(),
this.bold = const QuillToolbarToggleStyleButtonOptions(),
this.subscript = const QuillToolbarToggleStyleButtonOptions(),
this.superscript = const QuillToolbarToggleStyleButtonOptions(),
this.italic = const QuillToolbarToggleStyleButtonOptions(),
this.small = const QuillToolbarToggleStyleButtonOptions(),
this.underLine = const QuillToolbarToggleStyleButtonOptions(),
this.strikeThrough = const QuillToolbarToggleStyleButtonOptions(),
this.inlineCode = const QuillToolbarToggleStyleButtonOptions(),
this.direction = const QuillToolbarToggleStyleButtonOptions(),
this.listNumbers = const QuillToolbarToggleStyleButtonOptions(),
this.listBullets = const QuillToolbarToggleStyleButtonOptions(),
this.codeBlock = const QuillToolbarToggleStyleButtonOptions(),
this.quote = const QuillToolbarToggleStyleButtonOptions(),
this.toggleCheckList = const QuillToolbarToggleCheckListButtonOptions(),
this.indentIncrease = const QuillToolbarIndentButtonOptions(),
this.indentDecrease = const QuillToolbarIndentButtonOptions(),
this.color = const QuillToolbarColorButtonOptions(),
this.backgroundColor = const QuillToolbarColorButtonOptions(),
this.clearFormat = const QuillToolbarClearFormatButtonOptions(),
this.selectAlignmentButtons =
const QuillToolbarSelectAlignmentButtonOptions(),
this.search = const QuillToolbarSearchButtonOptions(),
this.selectHeaderStyleButtons =
const QuillToolbarSelectHeaderStyleButtonsOptions(),
this.linkStyle = const QuillToolbarLinkStyleButtonOptions(),
this.linkStyle2 = const QuillToolbarLinkStyleButton2Options(),
this.customButtons = const QuillToolbarCustomButtonOptions(),
});
/// The base configurations for all the buttons which will apply to all
/// but if the options overrided in the spesefic button options
/// then it will use that instead
final QuillToolbarBaseButtonOptions base;
final QuillToolbarHistoryButtonOptions undoHistory;
final QuillToolbarHistoryButtonOptions redoHistory;
final QuillToolbarFontFamilyButtonOptions fontFamily;
final QuillToolbarFontSizeButtonOptions fontSize;
final QuillToolbarToggleStyleButtonOptions bold;
final QuillToolbarToggleStyleButtonOptions subscript;
final QuillToolbarToggleStyleButtonOptions superscript;
final QuillToolbarToggleStyleButtonOptions italic;
final QuillToolbarToggleStyleButtonOptions small;
final QuillToolbarToggleStyleButtonOptions underLine;
final QuillToolbarToggleStyleButtonOptions strikeThrough;
final QuillToolbarToggleStyleButtonOptions inlineCode;
final QuillToolbarToggleStyleButtonOptions direction;
final QuillToolbarToggleStyleButtonOptions listNumbers;
final QuillToolbarToggleStyleButtonOptions listBullets;
final QuillToolbarToggleStyleButtonOptions codeBlock;
final QuillToolbarToggleStyleButtonOptions quote;
final QuillToolbarToggleCheckListButtonOptions toggleCheckList;
final QuillToolbarIndentButtonOptions indentIncrease;
final QuillToolbarIndentButtonOptions indentDecrease;
final QuillToolbarColorButtonOptions color;
final QuillToolbarColorButtonOptions backgroundColor;
final QuillToolbarClearFormatButtonOptions clearFormat;
/// The reason we call this buttons in the end because this is responsible
/// for all the alignment buttons and not just one, you still
/// can customize the icons and tooltips
/// and you have child builder
final QuillToolbarSelectAlignmentButtonOptions selectAlignmentButtons;
final QuillToolbarSearchButtonOptions search;
/// The reason we call this buttons in the end because this is responsible
/// for all the header style buttons and not just one, you still
/// can customize it and you also have child builder
final QuillToolbarSelectHeaderStyleButtonsOptions selectHeaderStyleButtons;
final QuillToolbarLinkStyleButtonOptions linkStyle;
final QuillToolbarLinkStyleButton2Options linkStyle2;
final QuillToolbarCustomButtonOptions customButtons;
@override
List<Object?> get props => [
base,
];
}

@ -1,6 +1,6 @@
import 'package:flutter/widgets.dart' show immutable; import 'package:flutter/widgets.dart' show immutable;
import '../../../widgets/toolbar/base_toolbar.dart'; import 'simple_toolbar_button_options.dart';
import 'toolbar_shared_configurations.dart'; import 'toolbar_shared_configurations.dart';
@immutable @immutable
@ -10,7 +10,7 @@ class QuillToolbarConfigurations extends QuillSharedToolbarProperties {
/// Note this only used when you using the quill toolbar buttons like /// Note this only used when you using the quill toolbar buttons like
/// `QuillToolbarHistoryButton` inside it /// `QuillToolbarHistoryButton` inside it
super.buttonOptions = const QuillToolbarButtonOptions(), super.buttonOptions = const QuillSimpleToolbarButtonOptions(),
}); });
@override @override

@ -20,12 +20,14 @@ abstract class QuillSharedToolbarProperties extends Equatable {
this.linkDialogAction, this.linkDialogAction,
this.multiRowsDisplay = true, this.multiRowsDisplay = true,
this.decoration, this.decoration,
this.buttonOptions = const QuillToolbarButtonOptions(), this.buttonOptions = const QuillSimpleToolbarButtonOptions(),
this.toolbarRunSpacing = 4,
}); });
final Axis axis; final Axis axis;
final double toolbarSectionSpacing; final double toolbarSectionSpacing;
final WrapAlignment toolbarIconAlignment; final WrapAlignment toolbarIconAlignment;
final WrapCrossAlignment toolbarIconCrossAlignment; final WrapCrossAlignment toolbarIconCrossAlignment;
final double toolbarRunSpacing;
final double? toolbarSize; final double? toolbarSize;
// Overrides the action in the _LinkDialog widget // Overrides the action in the _LinkDialog widget
@ -54,7 +56,7 @@ abstract class QuillSharedToolbarProperties extends Equatable {
/// If you want change spesefic buttons or all of them /// If you want change spesefic buttons or all of them
/// then you came to the right place /// then you came to the right place
final QuillToolbarButtonOptions buttonOptions; final QuillSimpleToolbarButtonOptions buttonOptions;
final QuillSharedConfigurations sharedConfigurations; final QuillSharedConfigurations sharedConfigurations;
} }

@ -158,12 +158,24 @@ class Attribute<T> extends Equatable {
Attribute.video.key, Attribute.video.key,
}; };
/// "attributes":{"header": 1 }
static const Attribute<int?> h1 = HeaderAttribute(level: 1); static const Attribute<int?> h1 = HeaderAttribute(level: 1);
/// "attributes":{"header": 2 }
static const Attribute<int?> h2 = HeaderAttribute(level: 2); static const Attribute<int?> h2 = HeaderAttribute(level: 2);
/// "attributes":{"header": 3 }
static const Attribute<int?> h3 = HeaderAttribute(level: 3); static const Attribute<int?> h3 = HeaderAttribute(level: 3);
/// "attributes":{"header": 4 }
static const Attribute<int?> h4 = HeaderAttribute(level: 4);
/// "attributes":{"header": 5 }
static const Attribute<int?> h5 = HeaderAttribute(level: 5);
/// "attributes":{"header": 6 }
static const Attribute<int?> h6 = HeaderAttribute(level: 6);
// "attributes":{"align":"left"} // "attributes":{"align":"left"}
static const Attribute<String?> leftAlignment = AlignAttribute('left'); static const Attribute<String?> leftAlignment = AlignAttribute('left');

@ -1,5 +1,10 @@
import 'dart:async' show StreamController; import 'dart:async' show StreamController;
import 'package:html2md/html2md.dart' as html2md;
import 'package:markdown/markdown.dart' as md;
import '../../../markdown_quill.dart';
import '../../../quill_delta.dart'; import '../../../quill_delta.dart';
import '../../widgets/quill/embeds.dart'; import '../../widgets/quill/embeds.dart';
import '../rules/rule.dart'; import '../rules/rule.dart';
@ -442,6 +447,40 @@ class Document {
delta.first.data == '\n' && delta.first.data == '\n' &&
delta.first.key == 'insert'; delta.first.key == 'insert';
} }
/// Convert the HTML Raw string to [Delta]
///
/// It will run using the following steps:
///
/// 1. Convert the html to markdown string using `html2md` package
/// 2. Convert the markdown string to quill delta json string
/// 3. Decode the delta json string to [Delta]
///
/// for more [info](https://github.com/singerdmx/flutter-quill/issues/1100)
static Delta fromHtml(String html) {
final markdown = html2md
.convert(
html,
)
.replaceAll('unsafe:', '');
final mdDocument = md.Document(encodeHtml: false);
final mdToDelta = MarkdownToDelta(markdownDocument: mdDocument);
return mdToDelta.convert(markdown);
// final deltaJsonString = markdownToDelta(markdown);
// final deltaJson = jsonDecode(deltaJsonString);
// if (deltaJson is! List) {
// throw ArgumentError(
// 'The delta json string should be of type list when jsonDecode() it',
// );
// }
// return Delta.fromJson(
// deltaJson,
// );
}
} }
/// Source of a [Change]. /// Source of a [Change].

@ -34,5 +34,5 @@ class QuillIconTheme {
final double? borderRadius; final double? borderRadius;
///The padding for icons ///The padding for icons
final EdgeInsets? padding; final EdgeInsets? padding;
} }

@ -1,3 +1,5 @@
import '../../flutter_quill.dart';
dynamic getFontSize(dynamic sizeValue) { dynamic getFontSize(dynamic sizeValue) {
if (sizeValue is String && if (sizeValue is String &&
['small', 'normal', 'large', 'huge'].contains(sizeValue)) { ['small', 'normal', 'large', 'huge'].contains(sizeValue)) {
@ -19,3 +21,32 @@ dynamic getFontSize(dynamic sizeValue) {
} }
return fontSize; return fontSize;
} }
double? getFontSizeAsDouble(dynamic sizeValue,
{required DefaultStyles defaultStyles}) {
if (sizeValue is String &&
['small', 'normal', 'large', 'huge'].contains(sizeValue)) {
return switch (sizeValue) {
'small' => defaultStyles.sizeSmall?.fontSize,
'normal' => null,
'large' => defaultStyles.sizeLarge?.fontSize,
'huge' => defaultStyles.sizeHuge?.fontSize,
String() => throw ArgumentError(),
};
}
if (sizeValue is double) {
return sizeValue;
}
if (sizeValue is int) {
return sizeValue.toDouble();
}
assert(sizeValue is String);
final fontSize = double.tryParse(sizeValue);
if (fontSize == null) {
throw ArgumentError('Invalid size $sizeValue');
}
return fontSize;
}

@ -1,4 +1,4 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart' show Alignment, TextAlign;
Map<String, String> parseKeyValuePairs(String s, Set<String> targetKeys) { Map<String, String> parseKeyValuePairs(String s, Set<String> targetKeys) {
final result = <String, String>{}; final result = <String, String>{};
@ -51,3 +51,13 @@ Alignment getAlignment(String? cssAlignment) {
Alignment.bottomRight Alignment.bottomRight
][index]; ][index];
} }
TextAlign? getTextAlign(String value) {
return switch (value) {
'center' => TextAlign.center,
'right' => TextAlign.right,
'left' => TextAlign.left,
'justify' => null,
Object() => null,
};
}

@ -67,6 +67,9 @@ class InlineCodeStyle {
this.header1, this.header1,
this.header2, this.header2,
this.header3, this.header3,
this.header4,
this.header5,
this.header6,
this.backgroundColor, this.backgroundColor,
this.radius, this.radius,
}); });
@ -83,6 +86,15 @@ class InlineCodeStyle {
/// Style override for inline code in headings level 3. /// Style override for inline code in headings level 3.
final TextStyle? header3; final TextStyle? header3;
/// Style override for inline code in headings level 4.
final TextStyle? header4;
/// Style override for inline code in headings level 5.
final TextStyle? header5;
/// Style override for inline code in headings level 6.
final TextStyle? header6;
/// Background color for inline code. /// Background color for inline code.
final Color? backgroundColor; final Color? backgroundColor;
@ -101,6 +113,15 @@ class InlineCodeStyle {
if (lineStyle.containsKey(Attribute.h3.key)) { if (lineStyle.containsKey(Attribute.h3.key)) {
return header3 ?? style; return header3 ?? style;
} }
if (lineStyle.containsKey(Attribute.h4.key)) {
return header4 ?? style;
}
if (lineStyle.containsKey(Attribute.h5.key)) {
return header5 ?? style;
}
if (lineStyle.containsKey(Attribute.h6.key)) {
return header6 ?? style;
}
return style; return style;
} }
@ -116,13 +137,16 @@ class InlineCodeStyle {
other.header1 == header1 && other.header1 == header1 &&
other.header2 == header2 && other.header2 == header2 &&
other.header3 == header3 && other.header3 == header3 &&
other.header4 == header4 &&
other.header5 == header5 &&
other.header6 == header6 &&
other.backgroundColor == backgroundColor && other.backgroundColor == backgroundColor &&
other.radius == radius; other.radius == radius;
} }
@override @override
int get hashCode => int get hashCode => Object.hash(style, header1, header2, header3, header4,
Object.hash(style, header1, header2, header3, backgroundColor, radius); header5, header6, backgroundColor, radius);
} }
@immutable @immutable
@ -144,6 +168,9 @@ class DefaultStyles {
this.h1, this.h1,
this.h2, this.h2,
this.h3, this.h3,
this.h4,
this.h5,
this.h6,
this.paragraph, this.paragraph,
this.bold, this.bold,
this.subscript, this.subscript,
@ -170,6 +197,9 @@ class DefaultStyles {
final DefaultTextBlockStyle? h1; final DefaultTextBlockStyle? h1;
final DefaultTextBlockStyle? h2; final DefaultTextBlockStyle? h2;
final DefaultTextBlockStyle? h3; final DefaultTextBlockStyle? h3;
final DefaultTextBlockStyle? h4;
final DefaultTextBlockStyle? h5;
final DefaultTextBlockStyle? h6;
final DefaultTextBlockStyle? paragraph; final DefaultTextBlockStyle? paragraph;
final TextStyle? bold; final TextStyle? bold;
final TextStyle? subscript; final TextStyle? subscript;
@ -220,9 +250,10 @@ class DefaultStyles {
h1: DefaultTextBlockStyle( h1: DefaultTextBlockStyle(
defaultTextStyle.style.copyWith( defaultTextStyle.style.copyWith(
fontSize: 34, fontSize: 34,
color: defaultTextStyle.style.color!.withOpacity(0.70), color: defaultTextStyle.style.color,
height: 1.15, letterSpacing: -1,
fontWeight: FontWeight.w300, height: 1,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
const VerticalSpacing(16, 0), const VerticalSpacing(16, 0),
@ -230,10 +261,11 @@ class DefaultStyles {
null), null),
h2: DefaultTextBlockStyle( h2: DefaultTextBlockStyle(
defaultTextStyle.style.copyWith( defaultTextStyle.style.copyWith(
fontSize: 24, fontSize: 30,
color: defaultTextStyle.style.color!.withOpacity(0.70), color: defaultTextStyle.style.color,
height: 1.15, letterSpacing: -0.8,
fontWeight: FontWeight.normal, height: 1.067,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
const VerticalSpacing(8, 0), const VerticalSpacing(8, 0),
@ -241,26 +273,72 @@ class DefaultStyles {
null), null),
h3: DefaultTextBlockStyle( h3: DefaultTextBlockStyle(
defaultTextStyle.style.copyWith( defaultTextStyle.style.copyWith(
fontSize: 20, fontSize: 24,
color: defaultTextStyle.style.color!.withOpacity(0.70), color: defaultTextStyle.style.color,
height: 1.25, letterSpacing: -0.5,
fontWeight: FontWeight.w500, height: 1.083,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none, decoration: TextDecoration.none,
), ),
const VerticalSpacing(8, 0), const VerticalSpacing(8, 0),
const VerticalSpacing(0, 0), const VerticalSpacing(0, 0),
null, null,
), ),
paragraph: DefaultTextBlockStyle(baseStyle, const VerticalSpacing(0, 0), h4: DefaultTextBlockStyle(
const VerticalSpacing(0, 0), null), defaultTextStyle.style.copyWith(
fontSize: 20,
color: defaultTextStyle.style.color,
letterSpacing: -0.4,
height: 1.1,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
),
const VerticalSpacing(6, 0),
const VerticalSpacing(0, 0),
null,
),
h5: DefaultTextBlockStyle(
defaultTextStyle.style.copyWith(
fontSize: 18,
color: defaultTextStyle.style.color,
letterSpacing: -0.2,
height: 1.11,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
),
const VerticalSpacing(6, 0),
const VerticalSpacing(0, 0),
null,
),
h6: DefaultTextBlockStyle(
defaultTextStyle.style.copyWith(
fontSize: 16,
color: defaultTextStyle.style.color,
letterSpacing: -0.1,
height: 1.125,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
),
const VerticalSpacing(4, 0),
const VerticalSpacing(0, 0),
null,
),
paragraph: DefaultTextBlockStyle(
baseStyle,
const VerticalSpacing(0, 0),
const VerticalSpacing(0, 0),
null,
),
bold: const TextStyle(fontWeight: FontWeight.bold), bold: const TextStyle(fontWeight: FontWeight.bold),
subscript: const TextStyle( subscript: const TextStyle(
fontFeatures: [ fontFeatures: [
FontFeature.liningFigures(),
FontFeature.subscripts(), FontFeature.subscripts(),
], ],
), ),
superscript: const TextStyle( superscript: const TextStyle(
fontFeatures: [ fontFeatures: [
FontFeature.liningFigures(),
FontFeature.superscripts(), FontFeature.superscripts(),
], ],
), ),
@ -274,9 +352,12 @@ class DefaultStyles {
style: inlineCodeStyle, style: inlineCodeStyle,
header1: inlineCodeStyle.copyWith( header1: inlineCodeStyle.copyWith(
fontSize: 32, fontSize: 32,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w500,
),
header2: inlineCodeStyle.copyWith(
fontSize: 22,
fontWeight: FontWeight.w500,
), ),
header2: inlineCodeStyle.copyWith(fontSize: 22),
header3: inlineCodeStyle.copyWith( header3: inlineCodeStyle.copyWith(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -353,6 +434,9 @@ class DefaultStyles {
h1: other.h1 ?? h1, h1: other.h1 ?? h1,
h2: other.h2 ?? h2, h2: other.h2 ?? h2,
h3: other.h3 ?? h3, h3: other.h3 ?? h3,
h4: other.h4 ?? h4,
h5: other.h5 ?? h5,
h6: other.h6 ?? h6,
paragraph: other.paragraph ?? paragraph, paragraph: other.paragraph ?? paragraph,
bold: other.bold ?? bold, bold: other.bold ?? bold,
subscript: other.subscript ?? subscript, subscript: other.subscript ?? subscript,

@ -1,11 +1,9 @@
import 'dart:math' as math; import 'dart:math' as math;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart' show ClipboardData, Clipboard;
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:html2md/html2md.dart' as html2md; import 'package:meta/meta.dart';
import 'package:markdown/markdown.dart' as md;
import '../../../markdown_quill.dart';
import '../../../quill_delta.dart'; import '../../../quill_delta.dart';
import '../../models/documents/attribute.dart'; import '../../models/documents/attribute.dart';
import '../../models/documents/document.dart'; import '../../models/documents/document.dart';
@ -16,6 +14,7 @@ import '../../models/structs/doc_change.dart';
import '../../models/structs/image_url.dart'; import '../../models/structs/image_url.dart';
import '../../models/structs/offset_value.dart'; import '../../models/structs/offset_value.dart';
import '../../utils/delta.dart'; import '../../utils/delta.dart';
import '../toolbar/buttons/toggle_style_button.dart';
typedef ReplaceTextCallback = bool Function(int index, int len, Object? data); typedef ReplaceTextCallback = bool Function(int index, int len, Object? data);
typedef DeleteCallback = void Function(int cursorPosition, bool forward); typedef DeleteCallback = void Function(int cursorPosition, bool forward);
@ -24,14 +23,13 @@ class QuillController extends ChangeNotifier {
QuillController({ QuillController({
required Document document, required Document document,
required TextSelection selection, required TextSelection selection,
bool keepStyleOnNewLine = false, this.keepStyleOnNewLine = true,
this.onReplaceText, this.onReplaceText,
this.onDelete, this.onDelete,
this.onSelectionCompleted, this.onSelectionCompleted,
this.onSelectionChanged, this.onSelectionChanged,
}) : _document = document, }) : _document = document,
_selection = selection, _selection = selection;
_keepStyleOnNewLine = keepStyleOnNewLine;
factory QuillController.basic() { factory QuillController.basic() {
return QuillController( return QuillController(
@ -54,6 +52,7 @@ class QuillController extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
@experimental
void setContents( void setContents(
Delta delta, { Delta delta, {
ChangeSource changeSource = ChangeSource.local, ChangeSource changeSource = ChangeSource.local,
@ -68,6 +67,9 @@ class QuillController extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
// Thoses are the values that the user selects and not the one
// from the current line
/// The current font family, null to use the default one /// The current font family, null to use the default one
String? _selectedFontFamily; String? _selectedFontFamily;
@ -88,9 +90,20 @@ class QuillController extends ChangeNotifier {
_selectedFontSize = newFontSize; _selectedFontSize = newFontSize;
} }
/// For the [QuillToolbarToggleStyleButton]
final Map<Attribute, bool?> _selectedStyles = {};
/// For the [QuillToolbarToggleStyleButton]
Map<Attribute, bool?> get selectedStyles => _selectedStyles;
/// For the [QuillToolbarToggleStyleButton]
void selectStyle(Attribute attribute, bool value) {
_selectedStyles[attribute] = value;
}
/// Tells whether to keep or reset the [toggledStyle] /// Tells whether to keep or reset the [toggledStyle]
/// when user adds a new line. /// when user adds a new line.
final bool _keepStyleOnNewLine; final bool keepStyleOnNewLine;
/// Currently selected text within the [document]. /// Currently selected text within the [document].
TextSelection get selection => _selection; TextSelection get selection => _selection;
@ -269,6 +282,7 @@ class QuillController extends ChangeNotifier {
Object? data, Object? data,
TextSelection? textSelection, { TextSelection? textSelection, {
bool ignoreFocus = false, bool ignoreFocus = false,
bool shouldNotifyListeners = true,
}) { }) {
assert(data is String || data is Embeddable); assert(data is String || data is Embeddable);
@ -324,7 +338,9 @@ class QuillController extends ChangeNotifier {
if (ignoreFocus) { if (ignoreFocus) {
ignoreFocusOnTextChange = true; ignoreFocusOnTextChange = true;
} }
notifyListeners(); if (shouldNotifyListeners) {
notifyListeners();
}
ignoreFocusOnTextChange = false; ignoreFocusOnTextChange = false;
} }
@ -342,7 +358,12 @@ class QuillController extends ChangeNotifier {
}); });
} }
void formatText(int index, int len, Attribute? attribute) { void formatText(
int index,
int len,
Attribute? attribute, {
bool shouldNotifyListeners = true,
}) {
if (len == 0 && if (len == 0 &&
attribute!.isInline && attribute!.isInline &&
attribute.key != Attribute.link.key) { attribute.key != Attribute.link.key) {
@ -361,11 +382,19 @@ class QuillController extends ChangeNotifier {
if (selection != adjustedSelection) { if (selection != adjustedSelection) {
_updateSelection(adjustedSelection, ChangeSource.local); _updateSelection(adjustedSelection, ChangeSource.local);
} }
notifyListeners(); if (shouldNotifyListeners) {
notifyListeners();
}
} }
void formatSelection(Attribute? attribute) { void formatSelection(Attribute? attribute,
formatText(selection.start, selection.end - selection.start, attribute); {bool shouldNotifyListeners = true}) {
formatText(
selection.start,
selection.end - selection.start,
attribute,
shouldNotifyListeners: shouldNotifyListeners,
);
} }
void moveCursorToStart() { void moveCursorToStart() {
@ -447,7 +476,7 @@ class QuillController extends ChangeNotifier {
_selection = selection.copyWith( _selection = selection.copyWith(
baseOffset: math.min(selection.baseOffset, end), baseOffset: math.min(selection.baseOffset, end),
extentOffset: math.min(selection.extentOffset, end)); extentOffset: math.min(selection.extentOffset, end));
if (_keepStyleOnNewLine) { if (keepStyleOnNewLine) {
final style = getSelectionStyle(); final style = getSelectionStyle();
final ignoredStyles = style.attributes.values.where( final ignoredStyles = style.attributes.values.where(
(s) => !s.isInline || s.key == Attribute.link.key, (s) => !s.isInline || s.key == Attribute.link.key,
@ -476,38 +505,4 @@ class QuillController extends ChangeNotifier {
// Notify toolbar buttons directly with attributes // Notify toolbar buttons directly with attributes
Map<String, Attribute> toolbarButtonToggler = const {}; Map<String, Attribute> toolbarButtonToggler = const {};
/// Convert the HTML Raw string to [Delta]
///
/// It will run using the following steps:
///
/// 1. Convert the html to markdown string using `html2md` package
/// 2. Convert the markdown string to quill delta json string
/// 3. Decode the delta json string to [Delta]
///
/// for more [info](https://github.com/singerdmx/flutter-quill/issues/1100)
static Delta fromHtml(String html) {
final markdown = html2md
.convert(
html,
)
.replaceAll('unsafe:', '');
final mdDocument = md.Document(encodeHtml: false);
final mdToDelta = MarkdownToDelta(markdownDocument: mdDocument);
return mdToDelta.convert(markdown);
// final deltaJsonString = markdownToDelta(markdown);
// final deltaJson = jsonDecode(deltaJsonString);
// if (deltaJson is! List) {
// throw ArgumentError(
// 'The delta json string should be of type list when jsonDecode() it',
// );
// }
// return Delta.fromJson(
// deltaJson,
// );
}
} }

@ -7,6 +7,7 @@ import '../../models/documents/nodes/block.dart';
import '../../models/documents/nodes/line.dart'; import '../../models/documents/nodes/line.dart';
import '../../models/structs/vertical_spacing.dart'; import '../../models/structs/vertical_spacing.dart';
import '../../utils/delta.dart'; import '../../utils/delta.dart';
import '../../utils/font.dart';
import '../editor/editor.dart'; import '../editor/editor.dart';
import '../others/box.dart'; import '../others/box.dart';
import '../others/cursor.dart'; import '../others/cursor.dart';
@ -17,6 +18,7 @@ import '../others/text_selection.dart';
import '../style_widgets/bullet_point.dart'; import '../style_widgets/bullet_point.dart';
import '../style_widgets/checkbox_point.dart'; import '../style_widgets/checkbox_point.dart';
import '../style_widgets/number_point.dart'; import '../style_widgets/number_point.dart';
import '../toolbar/base_toolbar.dart';
import 'quill_controller.dart'; import 'quill_controller.dart';
import 'text_line.dart'; import 'text_line.dart';
@ -211,12 +213,45 @@ class EditableTextBlock extends StatelessWidget {
final fontSize = defaultStyles.paragraph?.style.fontSize ?? 16; final fontSize = defaultStyles.paragraph?.style.fontSize ?? 16;
final attrs = line.style.attributes; final attrs = line.style.attributes;
// Of the color button
final fontColor =
line.toDelta().operations.first.attributes?[Attribute.color.key] != null
? hexToColor(
line
.toDelta()
.operations
.first
.attributes?[Attribute.color.key],
)
: null;
// Of the size button
final size =
line.toDelta().operations.first.attributes?[Attribute.size.key] != null
? getFontSizeAsDouble(
line.toDelta().operations.first.attributes?[Attribute.size.key],
defaultStyles: defaultStyles,
)
: null;
// Of the alignment buttons
// final textAlign = line.style.attributes[Attribute.align.key]?.value != null
// ? getTextAlign(line.style.attributes[Attribute.align.key]?.value)
// : null;
if (attrs[Attribute.list.key] == Attribute.ol) { if (attrs[Attribute.list.key] == Attribute.ol) {
return QuillEditorNumberPoint( return QuillEditorNumberPoint(
index: index, index: index,
indentLevelCounts: indentLevelCounts, indentLevelCounts: indentLevelCounts,
count: count, count: count,
style: defaultStyles.leading!.style, style: defaultStyles.leading!.style.copyWith(
fontSize: size,
color: context.quillEditorElementOptions?.orderedList
.useTextColorForDot ==
true
? fontColor
: null,
),
attrs: attrs, attrs: attrs,
width: _numberPointWidth(fontSize, count), width: _numberPointWidth(fontSize, count),
padding: fontSize / 2, padding: fontSize / 2,
@ -225,8 +260,15 @@ class EditableTextBlock extends StatelessWidget {
if (attrs[Attribute.list.key] == Attribute.ul) { if (attrs[Attribute.list.key] == Attribute.ul) {
return QuillEditorBulletPoint( return QuillEditorBulletPoint(
style: style: defaultStyles.leading!.style.copyWith(
defaultStyles.leading!.style.copyWith(fontWeight: FontWeight.bold), fontWeight: FontWeight.bold,
fontSize: size,
color: context.quillEditorElementOptions?.unorderedList
.useTextColorForDot ==
true
? fontColor
: null,
),
width: fontSize * 2, width: fontSize * 2,
padding: fontSize / 2, padding: fontSize / 2,
); );
@ -312,6 +354,18 @@ class EditableTextBlock extends StatelessWidget {
top = defaultStyles!.h3!.verticalSpacing.top; top = defaultStyles!.h3!.verticalSpacing.top;
bottom = defaultStyles.h3!.verticalSpacing.bottom; bottom = defaultStyles.h3!.verticalSpacing.bottom;
break; break;
case 4:
top = defaultStyles!.h4!.verticalSpacing.top;
bottom = defaultStyles.h4!.verticalSpacing.bottom;
break;
case 5:
top = defaultStyles!.h5!.verticalSpacing.top;
bottom = defaultStyles.h5!.verticalSpacing.bottom;
break;
case 6:
top = defaultStyles!.h6!.verticalSpacing.top;
bottom = defaultStyles.h6!.verticalSpacing.bottom;
break;
default: default:
throw ArgumentError('Invalid level $level'); throw ArgumentError('Invalid level $level');
} }

@ -276,6 +276,9 @@ class _TextLineState extends State<TextLine> {
Attribute.h1: defaultStyles.h1!.style, Attribute.h1: defaultStyles.h1!.style,
Attribute.h2: defaultStyles.h2!.style, Attribute.h2: defaultStyles.h2!.style,
Attribute.h3: defaultStyles.h3!.style, Attribute.h3: defaultStyles.h3!.style,
Attribute.h4: defaultStyles.h4!.style,
Attribute.h5: defaultStyles.h5!.style,
Attribute.h6: defaultStyles.h6!.style,
}; };
textStyle = textStyle.merge(m[header] ?? defaultStyles.paragraph!.style); textStyle = textStyle.merge(m[header] ?? defaultStyles.paragraph!.style);
@ -401,7 +404,11 @@ class _TextLineState extends State<TextLine> {
res = res.merge(defaultStyles.sizeHuge); res = res.merge(defaultStyles.sizeHuge);
break; break;
default: default:
res = res.merge(TextStyle(fontSize: getFontSize(size.value))); res = res.merge(TextStyle(
fontSize: getFontSize(
size.value,
),
));
} }
} }

@ -213,7 +213,7 @@ class QuillRawEditorState extends EditorState
if (html == null) { if (html == null) {
return; return;
} }
final deltaFromCliboard = QuillController.fromHtml(html); final deltaFromCliboard = Document.fromHtml(html);
final delta = deltaFromCliboard.compose(controller.document.toDelta()); final delta = deltaFromCliboard.compose(controller.document.toDelta());
controller controller
@ -701,6 +701,21 @@ class QuillRawEditorState extends EditorState
control: !isDesktopMacOS, control: !isDesktopMacOS,
meta: isDesktopMacOS, meta: isDesktopMacOS,
): const QuillEditorApplyHeaderIntent(Attribute.h3), ): const QuillEditorApplyHeaderIntent(Attribute.h3),
SingleActivator(
LogicalKeyboardKey.digit4,
control: !isDesktopMacOS,
meta: isDesktopMacOS,
): const QuillEditorApplyHeaderIntent(Attribute.h4),
SingleActivator(
LogicalKeyboardKey.digit5,
control: !isDesktopMacOS,
meta: isDesktopMacOS,
): const QuillEditorApplyHeaderIntent(Attribute.h5),
SingleActivator(
LogicalKeyboardKey.digit6,
control: !isDesktopMacOS,
meta: isDesktopMacOS,
): const QuillEditorApplyHeaderIntent(Attribute.h6),
SingleActivator( SingleActivator(
LogicalKeyboardKey.digit0, LogicalKeyboardKey.digit0,
control: !isDesktopMacOS, control: !isDesktopMacOS,
@ -1061,6 +1076,12 @@ class QuillRawEditorState extends EditorState
return defaultStyles!.h2!.verticalSpacing; return defaultStyles!.h2!.verticalSpacing;
case 3: case 3:
return defaultStyles!.h3!.verticalSpacing; return defaultStyles!.h3!.verticalSpacing;
case 4:
return defaultStyles!.h4!.verticalSpacing;
case 5:
return defaultStyles!.h5!.verticalSpacing;
case 6:
return defaultStyles!.h6!.verticalSpacing;
default: default:
throw ArgumentError('Invalid level $level'); throw ArgumentError('Invalid level $level');
} }

@ -208,12 +208,8 @@ mixin RawEditorStateTextInputClientMixin on EditorState
value.selection, value.selection,
); );
// TODO: There is a bug here, the first character is not being formatted
if (widget.configurations.controller.selectedFontFamily != null) { if (widget.configurations.controller.selectedFontFamily != null) {
widget.configurations.controller.formatText( widget.configurations.controller.formatSelection(
diff.start,
diff.deleted.length,
Attribute.fromKeyValue( Attribute.fromKeyValue(
Attribute.font.key, Attribute.font.key,
widget.configurations.controller.selectedFontFamily, widget.configurations.controller.selectedFontFamily,
@ -221,21 +217,25 @@ mixin RawEditorStateTextInputClientMixin on EditorState
); );
} }
// TODO: A bug here too
if (widget.configurations.controller.selectedFontSize != null) { if (widget.configurations.controller.selectedFontSize != null) {
widget.configurations.controller.formatText( widget.configurations.controller.formatSelection(
diff.start,
diff.deleted.length,
Attribute.fromKeyValue( Attribute.fromKeyValue(
Attribute.size.key, Attribute.size.key,
widget.configurations.controller.selectedFontSize == '0' widget.configurations.controller.selectedFontSize == '0'
? null ? null
: getFontSize( : getFontSize(
widget.configurations.controller.selectedFontSize), widget.configurations.controller.selectedFontSize,
),
), ),
); );
} }
// if (widget.configurations.controller.keepStyleOnNewLine) {
// widget.configurations.controller.selectedStyles.forEach((key, value) {
// if (value ?? false) {
// widget.configurations.controller.formatSelection(key);
// }
// });
// }
} }
} }

@ -1,18 +1,20 @@
import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart';
import '../../extensions/quill_configurations_ext.dart';
class QuillEditorBulletPoint extends StatelessWidget { class QuillEditorBulletPoint extends StatelessWidget {
const QuillEditorBulletPoint({ const QuillEditorBulletPoint({
required this.style, required this.style,
required this.width, required this.width,
this.padding = 0, this.padding = 0,
this.backgroundColor,
this.textAlign,
super.key, super.key,
}); });
final TextStyle style; final TextStyle style;
final double width; final double width;
final double padding; final double padding;
final Color? backgroundColor;
final TextAlign? textAlign;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -20,12 +22,11 @@ class QuillEditorBulletPoint extends StatelessWidget {
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
width: width, width: width,
padding: EdgeInsetsDirectional.only(end: padding), padding: EdgeInsetsDirectional.only(end: padding),
color: context.quillEditorElementOptions?.unorderedList.backgroundColor, color: backgroundColor,
child: Text( child: Text(
'', '',
style: style.copyWith( style: style,
color: context.quillEditorElementOptions?.unorderedList.fontColor, textAlign: textAlign,
),
), ),
); );
} }

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../extensions/quill_configurations_ext.dart';
import '../../models/documents/attribute.dart'; import '../../models/documents/attribute.dart';
import '../quill/text_block.dart'; import '../quill/text_block.dart';
@ -12,9 +11,11 @@ class QuillEditorNumberPoint extends StatelessWidget {
required this.style, required this.style,
required this.width, required this.width,
required this.attrs, required this.attrs,
this.textAlign,
this.withDot = true, this.withDot = true,
this.padding = 0.0, this.padding = 0.0,
super.key, super.key,
this.backgroundColor,
}); });
final int index; final int index;
@ -25,6 +26,8 @@ class QuillEditorNumberPoint extends StatelessWidget {
final Map<String, Attribute> attrs; final Map<String, Attribute> attrs;
final bool withDot; final bool withDot;
final double padding; final double padding;
final Color? backgroundColor;
final TextAlign? textAlign;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -37,12 +40,11 @@ class QuillEditorNumberPoint extends StatelessWidget {
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
width: width, width: width,
padding: EdgeInsetsDirectional.only(end: padding), padding: EdgeInsetsDirectional.only(end: padding),
color: context.quillEditorElementOptions?.orderedList.backgroundColor, color: backgroundColor,
child: Text( child: Text(
withDot ? '$s.' : s, withDot ? '$s.' : s,
style: style.copyWith( style: style,
color: context.quillEditorElementOptions?.orderedList.fontColor, textAlign: textAlign,
),
), ),
); );
} }
@ -74,12 +76,11 @@ class QuillEditorNumberPoint extends StatelessWidget {
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
width: width, width: width,
padding: EdgeInsetsDirectional.only(end: padding), padding: EdgeInsetsDirectional.only(end: padding),
color: context.quillEditorElementOptions?.orderedList.backgroundColor, color: backgroundColor,
child: Text( child: Text(
withDot ? '$s.' : s, withDot ? '$s.' : s,
style: style.copyWith( style: style,
color: context.quillEditorElementOptions?.orderedList.fontColor, textAlign: textAlign,
),
), ),
); );
} }

@ -7,7 +7,7 @@ import '../../models/config/toolbar/simple_toolbar_configurations.dart';
import '../../models/config/toolbar/toolbar_configurations.dart'; import '../../models/config/toolbar/toolbar_configurations.dart';
import 'simple_toolbar.dart'; import 'simple_toolbar.dart';
export '../../models/config/toolbar/buttons/base_configurations.dart'; export '../../models/config/toolbar/base_button_configurations.dart';
export '../../models/config/toolbar/simple_toolbar_configurations.dart'; export '../../models/config/toolbar/simple_toolbar_configurations.dart';
export 'buttons/clear_format_button.dart'; export 'buttons/clear_format_button.dart';
export 'buttons/color/color_button.dart'; export 'buttons/color/color_button.dart';
@ -15,6 +15,7 @@ export 'buttons/custom_button_button.dart';
export 'buttons/font_family_button.dart'; export 'buttons/font_family_button.dart';
export 'buttons/font_size_button.dart'; export 'buttons/font_size_button.dart';
export 'buttons/hearder_style/select_header_style_buttons.dart'; export 'buttons/hearder_style/select_header_style_buttons.dart';
export 'buttons/hearder_style/select_header_style_dropdown_button.dart';
export 'buttons/history_button.dart'; export 'buttons/history_button.dart';
export 'buttons/indent_button.dart'; export 'buttons/indent_button.dart';
export 'buttons/link_style2_button.dart'; export 'buttons/link_style2_button.dart';

@ -87,7 +87,6 @@ class QuillToolbarClearFormatButton extends StatelessWidget {
return childBuilder( return childBuilder(
QuillToolbarClearFormatButtonOptions( QuillToolbarClearFormatButtonOptions(
afterButtonPressed: afterButtonPressed, afterButtonPressed: afterButtonPressed,
controller: controller,
iconData: iconData, iconData: iconData,
iconSize: iconSize, iconSize: iconSize,
iconButtonFactor: iconButtonFactor, iconButtonFactor: iconButtonFactor,

@ -32,6 +32,7 @@ class QuillToolbarColorButton extends StatefulWidget {
QuillToolbarColorButtonState createState() => QuillToolbarColorButtonState(); QuillToolbarColorButtonState createState() => QuillToolbarColorButtonState();
} }
// TODO: This button shouldn't require anything to use it
class QuillToolbarColorButtonState extends State<QuillToolbarColorButton> { class QuillToolbarColorButtonState extends State<QuillToolbarColorButton> {
late bool _isToggledColor; late bool _isToggledColor;
late bool _isToggledBackground; late bool _isToggledBackground;

@ -67,7 +67,6 @@ class QuillToolbarCustomButton extends StatelessWidget {
iconButtonFactor: iconButtonFactor, iconButtonFactor: iconButtonFactor,
iconSize: iconSize, iconSize: iconSize,
afterButtonPressed: afterButtonPressed, afterButtonPressed: afterButtonPressed,
controller: controller,
iconTheme: iconTheme, iconTheme: iconTheme,
tooltip: tooltip, tooltip: tooltip,
icon: options.icon, icon: options.icon,

@ -127,7 +127,6 @@ class QuillToolbarFontSizeButtonState
iconSize: iconSize, iconSize: iconSize,
iconButtonFactor: iconButtonFactor, iconButtonFactor: iconButtonFactor,
afterButtonPressed: afterButtonPressed, afterButtonPressed: afterButtonPressed,
controller: controller,
), ),
QuillToolbarFontSizeButtonExtraOptions( QuillToolbarFontSizeButtonExtraOptions(
controller: controller, controller: controller,

@ -1,145 +0,0 @@
import 'package:flutter/material.dart';
import '../../../../../translations.dart';
import '../../../../models/config/toolbar/buttons/select_header_style_configurations.dart';
import '../../../../models/documents/attribute.dart';
import '../../../quill/quill_controller.dart';
enum _HeaderStyleOptions {
normal,
headingOne,
headingTwo,
headingThree,
}
class QuillToolbarSelectHeaderStyleButton extends StatefulWidget {
const QuillToolbarSelectHeaderStyleButton({
required this.controller,
this.options = const QuillToolbarSelectHeaderStyleButtonsOptions(),
super.key,
});
final QuillController controller;
// TODO: Needs to be reviewed
final QuillToolbarSelectHeaderStyleButtonsOptions options;
@override
State<QuillToolbarSelectHeaderStyleButton> createState() =>
_QuillToolbarSelectHeaderStyleButtonState();
}
class _QuillToolbarSelectHeaderStyleButtonState
extends State<QuillToolbarSelectHeaderStyleButton> {
var _selectedItem = _HeaderStyleOptions.normal;
final _controller = MenuController();
@override
void initState() {
super.initState();
widget.controller.addListener(_didChangeEditingValue);
}
@override
void dispose() {
widget.controller.removeListener(_didChangeEditingValue);
super.dispose();
}
@override
void didUpdateWidget(
covariant QuillToolbarSelectHeaderStyleButton oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.controller == widget.controller) {
return;
}
widget.controller
..removeListener(_didChangeEditingValue)
..addListener(_didChangeEditingValue);
}
void _didChangeEditingValue() {
final newSelectedItem = _getOptionsItemByAttribute(_getHeaderValue());
if (newSelectedItem == _selectedItem) {
return;
}
setState(() {
_selectedItem = newSelectedItem;
});
}
Attribute<dynamic> _getHeaderValue() {
final attr = widget.controller.toolbarButtonToggler[Attribute.header.key];
if (attr != null) {
// checkbox tapping causes controller.selection to go to offset 0
widget.controller.toolbarButtonToggler.remove(Attribute.header.key);
return attr;
}
return widget.controller
.getSelectionStyle()
.attributes[Attribute.header.key] ??
Attribute.header;
}
String _label(_HeaderStyleOptions value) {
final label = switch (value) {
_HeaderStyleOptions.normal => context.loc.normal,
_HeaderStyleOptions.headingOne => context.loc.heading1,
_HeaderStyleOptions.headingTwo => context.loc.heading2,
_HeaderStyleOptions.headingThree => context.loc.heading3,
};
return label;
}
Attribute<dynamic>? getAttributeByOptionsItem(_HeaderStyleOptions option) {
return switch (option) {
_HeaderStyleOptions.normal => Attribute.header,
_HeaderStyleOptions.headingOne => Attribute.h1,
_HeaderStyleOptions.headingTwo => Attribute.h2,
_HeaderStyleOptions.headingThree => Attribute.h3,
};
}
_HeaderStyleOptions _getOptionsItemByAttribute(
Attribute<dynamic>? attribute) {
return switch (attribute) {
Attribute.h1 => _HeaderStyleOptions.headingOne,
Attribute.h2 => _HeaderStyleOptions.headingTwo,
Attribute.h2 => _HeaderStyleOptions.headingThree,
Attribute() => _HeaderStyleOptions.normal,
null => _HeaderStyleOptions.normal,
};
}
@override
Widget build(BuildContext context) {
return MenuAnchor(
controller: _controller,
menuChildren: _HeaderStyleOptions.values
.map(
(e) => MenuItemButton(
child: Text(_label(e)),
onPressed: () {
widget.controller.formatSelection(getAttributeByOptionsItem(e));
setState(() => _selectedItem = e);
},
),
)
.toList(),
child: IconButton(
onPressed: () {
if (_controller.isOpen) {
_controller.close();
return;
}
_controller.open();
},
icon: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(_label(_selectedItem)),
const Icon(Icons.arrow_drop_down),
],
),
),
);
}
}

@ -140,7 +140,7 @@ class QuillToolbarSelectHeaderStyleButtonsState
iconTheme: iconTheme, iconTheme: iconTheme,
tooltip: tooltip, tooltip: tooltip,
), ),
QuillToolbarSelectHeaderStyleButtonExtraOptions( QuillToolbarSelectHeaderStyleButtonsExtraOptions(
controller: controller, controller: controller,
context: context, context: context,
onPressed: () => _sharedOnPressed(attribute), onPressed: () => _sharedOnPressed(attribute),

@ -0,0 +1,199 @@
import 'package:flutter/material.dart';
import '../../../../../translations.dart';
import '../../../../extensions/quill_configurations_ext.dart';
import '../../../../models/documents/attribute.dart';
import '../../../../models/themes/quill_icon_theme.dart';
import '../../../quill/quill_controller.dart';
import '../../base_toolbar.dart';
class QuillToolbarSelectHeaderStyleDropdownButton extends StatefulWidget {
const QuillToolbarSelectHeaderStyleDropdownButton({
required this.controller,
this.options = const QuillToolbarSelectHeaderStyleDropdownButtonOptions(),
super.key,
});
final QuillController controller;
final QuillToolbarSelectHeaderStyleDropdownButtonOptions options;
@override
State<QuillToolbarSelectHeaderStyleDropdownButton> createState() =>
_QuillToolbarSelectHeaderStyleDropdownButtonState();
}
class _QuillToolbarSelectHeaderStyleDropdownButtonState
extends State<QuillToolbarSelectHeaderStyleDropdownButton> {
Attribute<dynamic> _selectedItem = Attribute.header;
final _controller = MenuController();
@override
void initState() {
super.initState();
widget.controller.addListener(_didChangeEditingValue);
}
@override
void dispose() {
widget.controller.removeListener(_didChangeEditingValue);
super.dispose();
}
@override
void didUpdateWidget(
covariant QuillToolbarSelectHeaderStyleDropdownButton oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.controller == widget.controller) {
return;
}
widget.controller
..removeListener(_didChangeEditingValue)
..addListener(_didChangeEditingValue);
}
void _didChangeEditingValue() {
final newSelectedItem = _getHeaderValue();
if (newSelectedItem == _selectedItem) {
return;
}
setState(() {
_selectedItem = newSelectedItem;
});
}
Attribute<dynamic> _getHeaderValue() {
final attr = widget.controller.toolbarButtonToggler[Attribute.header.key];
if (attr != null) {
// checkbox tapping causes controller.selection to go to offset 0
widget.controller.toolbarButtonToggler.remove(Attribute.header.key);
return attr;
}
return widget.controller
.getSelectionStyle()
.attributes[Attribute.header.key] ??
Attribute.header;
}
String _label(Attribute<dynamic> value) {
final label = switch (value) {
Attribute.h1 => context.loc.heading1,
Attribute.h2 => context.loc.heading2,
Attribute.h3 => context.loc.heading3,
Attribute.h4 => context.loc.heading4,
Attribute.h5 => context.loc.heading5,
Attribute.h6 => context.loc.heading6,
Attribute.header => context.loc.normal,
Attribute<dynamic>() => throw ArgumentError(),
};
return label;
}
double get iconSize {
final baseFontSize = context.quillToolbarBaseButtonOptions?.globalIconSize;
final iconSize = widget.options.iconSize;
return iconSize ?? baseFontSize ?? kDefaultIconSize;
}
double get iconButtonFactor {
final baseIconFactor =
context.quillToolbarBaseButtonOptions?.globalIconButtonFactor;
final iconButtonFactor = widget.options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor ?? kIconButtonFactor;
}
QuillIconTheme? get iconTheme {
return widget.options.iconTheme ??
context.quillToolbarBaseButtonOptions?.iconTheme;
}
List<Attribute<int?>> get headerAttributes {
return widget.options.attributes ??
[
Attribute.h1,
Attribute.h2,
Attribute.h3,
Attribute.h4,
Attribute.h5,
Attribute.h6,
Attribute.header,
];
}
QuillToolbarBaseButtonOptions get baseButtonExtraOptions {
return context.requireQuillToolbarBaseButtonOptions;
}
VoidCallback? get afterButtonPressed {
return widget.options.afterButtonPressed ??
baseButtonExtraOptions.afterButtonPressed;
}
void _onPressed(Attribute<int?> e) {
setState(() => _selectedItem = e);
widget.controller.formatSelection(_selectedItem);
}
@override
Widget build(BuildContext context) {
final baseButtonConfigurations =
context.requireQuillToolbarBaseButtonOptions;
final childBuilder =
widget.options.childBuilder ?? baseButtonConfigurations.childBuilder;
if (childBuilder != null) {
return childBuilder(
widget.options.copyWith(
iconSize: iconSize,
iconTheme: iconTheme,
afterButtonPressed: afterButtonPressed,
),
QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions(
currentValue: _selectedItem,
context: context,
controller: widget.controller,
onPressed: () {
throw UnimplementedError('Not implemented yet.');
},
),
);
}
return MenuAnchor(
controller: _controller,
menuChildren: headerAttributes
.map(
(e) => MenuItemButton(
onPressed: () {
_onPressed(e);
},
child: Text(_label(e)),
),
)
.toList(),
child: IconButton(
onPressed: () {
if (_controller.isOpen) {
_controller.close();
return;
}
_controller.open();
},
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,
),
],
),
),
);
}
}

@ -77,7 +77,6 @@ class QuillToolbarHistoryButtonState extends State<QuillToolbarHistoryButton> {
return childBuilder( return childBuilder(
QuillToolbarHistoryButtonOptions( QuillToolbarHistoryButtonOptions(
afterButtonPressed: afterButtonPressed, afterButtonPressed: afterButtonPressed,
controller: controller,
iconData: iconData, iconData: iconData,
iconSize: iconSize, iconSize: iconSize,
iconButtonFactor: iconButtonFactor, iconButtonFactor: iconButtonFactor,

@ -117,7 +117,6 @@ class QuillToolbarLinkStyleButtonState
return childBuilder( return childBuilder(
QuillToolbarLinkStyleButtonOptions( QuillToolbarLinkStyleButtonOptions(
afterButtonPressed: afterButtonPressed, afterButtonPressed: afterButtonPressed,
controller: controller,
dialogBarrierColor: dialogBarrierColor, dialogBarrierColor: dialogBarrierColor,
dialogTheme: options.dialogTheme, dialogTheme: options.dialogTheme,
iconData: iconData, iconData: iconData,

@ -24,12 +24,12 @@ class QuillToolbarIconButton extends StatelessWidget {
if (isFilled) { if (isFilled) {
return IconButton.filled( return IconButton.filled(
padding: padding, padding: padding,
constraints: const BoxConstraints(), onPressed: onPressed,
onPressed: onPressed, icon: icon); icon: icon,
);
} }
return IconButton( return IconButton(
padding: padding, padding: padding,
constraints: const BoxConstraints(),
onPressed: () { onPressed: () {
onPressed?.call(); onPressed?.call();
afterPressed?.call(); afterPressed?.call();

@ -87,7 +87,6 @@ class QuillToolbarSearchButton extends StatelessWidget {
return childBuilder( return childBuilder(
QuillToolbarSearchButtonOptions( QuillToolbarSearchButtonOptions(
afterButtonPressed: afterButtonPressed, afterButtonPressed: afterButtonPressed,
controller: controller,
dialogBarrierColor: _dialogBarrierColor(context), dialogBarrierColor: _dialogBarrierColor(context),
dialogTheme: _dialogTheme(context), dialogTheme: _dialogTheme(context),
fillColor: options.fillColor, fillColor: options.fillColor,

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save