Add toolbar run spacing property

pull/1596/head
Ellet 1 year ago
parent 8b4b90e398
commit 76ab1b3bd8
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 1
      CHANGELOG.md
  2. 9
      example/lib/presentation/quill/my_quill_toolbar.dart
  3. 2
      lib/src/models/config/toolbar/toolbar_shared_configurations.dart
  4. 2
      lib/src/widgets/toolbar/simple_toolbar.dart

@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
## 9.0.2-dev ## 9.0.2-dev
* **Breaking change** Remove the spacer widget, removed the controller option for each button * **Breaking change** Remove the spacer widget, removed the controller option for each button
* Add `toolbarRunSpacing` property to the simple toolbar
## 9.0.1 ## 9.0.1
* Fix default icon size * Fix default icon size

@ -100,14 +100,7 @@ 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: Wrap( child: Wrap(

@ -21,11 +21,13 @@ abstract class QuillSharedToolbarProperties extends Equatable {
this.multiRowsDisplay = true, this.multiRowsDisplay = true,
this.decoration, this.decoration,
this.buttonOptions = const QuillToolbarButtonOptions(), this.buttonOptions = const QuillToolbarButtonOptions(),
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

@ -329,7 +329,7 @@ class QuillSimpleToolbar extends StatelessWidget
direction: configurations.axis, direction: configurations.axis,
alignment: configurations.toolbarIconAlignment, alignment: configurations.toolbarIconAlignment,
crossAxisAlignment: configurations.toolbarIconCrossAlignment, crossAxisAlignment: configurations.toolbarIconCrossAlignment,
runSpacing: 4, runSpacing: configurations.toolbarRunSpacing,
spacing: configurations.toolbarSectionSpacing, spacing: configurations.toolbarSectionSpacing,
children: childrenBuilder(context), children: childrenBuilder(context),
); );

Loading…
Cancel
Save