Merge branch 'singerdmx:master' into master

pull/1270/head
Cierra_Runis 2 years ago committed by GitHub
commit cbd23fc0b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      CHANGELOG.md
  2. 2
      flutter_quill_extensions/pubspec.yaml
  3. 2
      lib/src/models/documents/attribute.dart
  4. 2
      lib/src/widgets/text_line.dart
  5. 34
      lib/src/widgets/toolbar.dart
  6. 4
      pubspec.yaml

@ -1,3 +1,12 @@
# [7.1.17]
- Updates `device_info_plus` to version 9.0.0 to benefit from AGP 8 (see [changelog#900](https://pub.dev/packages/device_info_plus/changelog#900)).
# [7.1.16]
- Fixed subscript key from 'sup' to 'sub'.
# [7.1.15]
- Fixed a bug introduced in 7.1.7 where each section in `QuillToolbar` was displayed on its own line.
# [7.1.14] # [7.1.14]
- Add indents change for multiline selection. - Add indents change for multiline selection.

@ -12,7 +12,7 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
flutter_quill: ^7.1.12 flutter_quill: ^7.1.17
image_picker: ^0.8.5+3 image_picker: ^0.8.5+3
photo_view: ^0.14.0 photo_view: ^0.14.0

@ -373,7 +373,7 @@ class ScriptAttribute extends Attribute<String?> {
enum ScriptAttributes { enum ScriptAttributes {
sup('super'), sup('super'),
sub('sup'); sub('sub');
const ScriptAttributes(this.value); const ScriptAttributes(this.value);

@ -282,7 +282,7 @@ class _TextLineState extends State<TextLine> {
toMerge = defaultStyles.quote!.style; toMerge = defaultStyles.quote!.style;
} else if (block == Attribute.codeBlock) { } else if (block == Attribute.codeBlock) {
toMerge = defaultStyles.code!.style; toMerge = defaultStyles.code!.style;
} else if (block == Attribute.list) { } else if (block?.key == Attribute.list.key) {
toMerge = defaultStyles.lists!.style; toMerge = defaultStyles.lists!.style;
} }

@ -409,7 +409,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
isButtonGroupShown[3] || isButtonGroupShown[3] ||
isButtonGroupShown[4] || isButtonGroupShown[4] ||
isButtonGroupShown[5])) isButtonGroupShown[5]))
AxisDivider(axis, QuillDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace), color: sectionDividerColor, space: sectionDividerSpace),
if (showAlignmentButtons) if (showAlignmentButtons)
SelectAlignmentButton( SelectAlignmentButton(
@ -445,7 +445,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
isButtonGroupShown[3] || isButtonGroupShown[3] ||
isButtonGroupShown[4] || isButtonGroupShown[4] ||
isButtonGroupShown[5])) isButtonGroupShown[5]))
AxisDivider(axis, QuillDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace), color: sectionDividerColor, space: sectionDividerSpace),
if (showHeaderStyle) if (showHeaderStyle)
SelectHeaderStyleButton( SelectHeaderStyleButton(
@ -462,7 +462,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
(isButtonGroupShown[3] || (isButtonGroupShown[3] ||
isButtonGroupShown[4] || isButtonGroupShown[4] ||
isButtonGroupShown[5])) isButtonGroupShown[5]))
AxisDivider(axis, QuillDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace), color: sectionDividerColor, space: sectionDividerSpace),
if (showListNumbers) if (showListNumbers)
ToggleStyleButton( ToggleStyleButton(
@ -507,7 +507,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
if (showDividers && if (showDividers &&
isButtonGroupShown[3] && isButtonGroupShown[3] &&
(isButtonGroupShown[4] || isButtonGroupShown[5])) (isButtonGroupShown[4] || isButtonGroupShown[5]))
AxisDivider(axis, QuillDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace), color: sectionDividerColor, space: sectionDividerSpace),
if (showQuote) if (showQuote)
ToggleStyleButton( ToggleStyleButton(
@ -540,7 +540,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
afterButtonPressed: afterButtonPressed, afterButtonPressed: afterButtonPressed,
), ),
if (showDividers && isButtonGroupShown[4] && isButtonGroupShown[5]) if (showDividers && isButtonGroupShown[4] && isButtonGroupShown[5])
AxisDivider(axis, QuillDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace), color: sectionDividerColor, space: sectionDividerSpace),
if (showLink) if (showLink)
LinkStyleButton( LinkStyleButton(
@ -563,7 +563,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
), ),
if (customButtons.isNotEmpty) if (customButtons.isNotEmpty)
if (showDividers) if (showDividers)
AxisDivider(axis, QuillDivider(axis,
color: sectionDividerColor, space: sectionDividerSpace), color: sectionDividerColor, space: sectionDividerSpace),
for (var customButton in customButtons) for (var customButton in customButtons)
QuillIconButton( QuillIconButton(
@ -643,27 +643,39 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
} }
} }
class AxisDivider extends StatelessWidget { /// The divider which is used for separation of buttons in the toolbar.
const AxisDivider( ///
/// It can be used outside of this package, for example when user does not use
/// [QuillToolbar.basic] and compose toolbat's children on its own.
class QuillDivider extends StatelessWidget {
const QuillDivider(
this.axis, { this.axis, {
Key? key, Key? key,
this.color, this.color,
this.space, this.space,
}) : super(key: key); }) : super(key: key);
const AxisDivider.horizontal({Color? color, double? space}) /// Provides a horizonal divider for vertical toolbar.
const QuillDivider.horizontal({Color? color, double? space})
: this(Axis.horizontal, color: color, space: space); : this(Axis.horizontal, color: color, space: space);
const AxisDivider.vertical({Color? color, double? space}) /// Provides a horizonal divider for horizontal toolbar.
const QuillDivider.vertical({Color? color, double? space})
: this(Axis.vertical, color: color, space: space); : this(Axis.vertical, color: color, space: space);
/// The axis along which the toolbar is.
final Axis axis; final Axis axis;
/// The color to use when painting this divider's line.
final Color? color; final Color? color;
/// The divider's space (width or height) depending of [axis].
final double? space; final double? space;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return axis == Axis.horizontal // Vertical toolbar requires horizontal divider, and vice versa
return axis == Axis.vertical
? Divider( ? Divider(
height: space, height: space,
color: color, color: color,

@ -1,6 +1,6 @@
name: flutter_quill name: flutter_quill
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
version: 7.1.14 version: 7.1.17+1
#author: bulletjournal #author: bulletjournal
homepage: https://bulletjournal.us/home/index.html homepage: https://bulletjournal.us/home/index.html
repository: https://github.com/singerdmx/flutter-quill repository: https://github.com/singerdmx/flutter-quill
@ -21,7 +21,7 @@ dependencies:
characters: ^1.2.1 characters: ^1.2.1
diff_match_patch: ^0.4.1 diff_match_patch: ^0.4.1
i18n_extension: ^8.0.0 i18n_extension: ^8.0.0
device_info_plus: ^8.1.0 device_info_plus: ^9.0.0
platform: ^3.1.0 platform: ^3.1.0
pasteboard: ^0.2.0 pasteboard: ^0.2.0

Loading…
Cancel
Save