chore: bump version 1.4.0 (#484)

This commit is contained in:
Lucas.Xu 2023-09-20 14:35:20 +08:00 • committed by GitHub
commit 6ddee3cc61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 66 additions and 37 deletions

View file

@ -1,3 +1,34 @@
## 1.4.0
* feat: adjust the loading large document optimization in mobile platform by @LucasXu0 in ([#474](https://github.com/AppFlowy-IO/appflowy-editor/pull/474))
* feat: simplify auto scroll behavior in ScrollServiceWidget by @LucasXu0 in ([#437](https://github.com/AppFlowy-IO/appflowy-editor/pull/437))
* feat: implement delta diff and provide external values by @LucasXu0 in ([#444](https://github.com/AppFlowy-IO/appflowy-editor/pull/444))
* feat: add more showcases on the mobile platform by @LucasXu0 in ([#479](https://github.com/AppFlowy-IO/appflowy-editor/pull/479))
* feat: add more showcases on desktop/mobile platform by @LucasXu0 in ([#481](https://github.com/AppFlowy-IO/appflowy-editor/pull/481))
* feat: support customizing the record time by @LucasXu0 in ([#461](https://github.com/AppFlowy-IO/appflowy-editor/pull/461))
* feat: bulk open links shortcut by @Tony-MK in ([#419](https://github.com/AppFlowy-IO/appflowy-editor/pull/419))
* feat: optimize the performance by @LucasXu0 in ([#442](https://github.com/AppFlowy-IO/appflowy-editor/pull/62))
* fix: request focus in find replace menu by @Xazin in ([#440](https://github.com/AppFlowy-IO/appflowy-editor/pull/440))
* fix: remove unused check in non_delta_input_service by @LucasXu0 in ([#447](https://github.com/AppFlowy-IO/appflowy-editor/pull/447))
* fix: unable to paste html contains section by @LucasXu0 in ([#448](https://github.com/AppFlowy-IO/appflowy-editor/pull/448))
* fix: sometimes failed to paste content from google translation by @LucasXu0 in ([#451](https://github.com/AppFlowy-IO/appflowy-editor/pull/451))
* fix: duration cannot be zero in animate by @Xazin in ([#452](https://github.com/AppFlowy-IO/appflowy-editor/pull/452))
* fix: image upload on web by @garv-shah in ([#453](https://github.com/AppFlowy-IO/appflowy-editor/pull/453))
* fix block selection area by @LucasXu0 in ([#462](https://github.com/AppFlowy-IO/appflowy-editor/pull/462))
* fix: resolve `RangeError` when last row deleted. by @sun-jiao in ([#470](https://github.com/AppFlowy-IO/appflowy-editor/pull/470))
* fix: resolve layout problem of `FindMenuWidget` by @sun-jiao in ([#467](https://github.com/AppFlowy-IO/appflowy-editor/pull/467))
* fix: show reset color button even if one of the selected text was formatted by @LucasXu0 in ([#476](https://github.com/AppFlowy-IO/appflowy-editor/pull/476))
* fix: selection area doesn't show if in the long selection by @LucasXu0 in ([#477](https://github.com/AppFlowy-IO/appflowy-editor/pull/477))
* fix: DT_TOOLCHAIN_DIR path in Podfile for iOS and macOS by @LucasXu0 in ([#483](https://github.com/AppFlowy-IO/appflowy-editor/pull/483))
* fix: respect default and last direction on new line and indent by @zoli in ([#482](https://github.com/AppFlowy-IO/appflowy-editor/pull/482))
* fix: link menu overflow in right by @sun-jiao in ([#478](https://github.com/AppFlowy-IO/appflowy-editor/pull/478))
* fix: resolve "Bad state: no element" when in-table paragraph deleted by @sun-jiao in ([#471](https://github.com/AppFlowy-IO/appflowy-editor/pull/471))
* chore: add jumpTo to editor scroll service by @Xazin in ([#466](https://github.com/AppFlowy-IO/appflowy-editor/pull/466))
* chore: update l10n by @sun-jiao in ([#463](https://github.com/AppFlowy-IO/appflowy-editor/pull/463))
* chore: refactor attribute comparison in Delta class diff loop by @LucasXu0 in ([#456](https://github.com/AppFlowy-IO/appflowy-editor/pull/456))
* chore: update Chinese l10n by @sun-jiao in ([#445](https://github.com/AppFlowy-IO/appflowy-editor/pull/445))
* chore: migrate tests by @MayurSMahajan in ([#438](https://github.com/AppFlowy-IO/appflowy-editor/pull/438))
* chore: refactor color conversion method to handle RGB and hex formatsRefactor method to handle RGB and hex formats, improving color conversion by @LucasXu0 in ([#450](https://github.com/AppFlowy-IO/appflowy-editor/pull/450))
## 1.3.0 ## 1.3.0
* feat: support table plugin by @zoli in ([#62](https://github.com/AppFlowy-IO/appflowy-editor/pull/62)) * feat: support table plugin by @zoli in ([#62](https://github.com/AppFlowy-IO/appflowy-editor/pull/62))
* feat: support alignment for block component by @LucasXu0 in ([#425](https://github.com/AppFlowy-IO/appflowy-editor/pull/425)) * feat: support alignment for block component by @LucasXu0 in ([#425](https://github.com/AppFlowy-IO/appflowy-editor/pull/425))

View file

@ -27,7 +27,7 @@ and the Flutter guide for
</p> </p>
<div align="center"> <div align="center">
<img src="https://github.com/AppFlowy-IO/appflowy-editor/blob/main/documentation/images/appflowy_editor_example.mp4?raw=true" width = "700" style = "padding: 100"/> <img src="https://github.com/AppFlowy-IO/appflowy-editor/blob/main/documentation/images/showcase.png?raw=true" width = "700" style = "padding: 100">
</div> </div>
## Key Features ## Key Features

View file

@ -1,5 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 4L12 4" stroke="#00BCF0" stroke-linecap="round" stroke-linejoin="round"/> <path d="M4 4H12M5 8H11M4 12L12 12" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5 8H11" stroke="#00BCF0" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 12L12 12" stroke="#00BCF0" stroke-linecap="round" stroke-linejoin="round"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 203 B

Before After
Before After

View file

@ -1 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M80 1056V935h800v121H80Zm343-631 200 200-172 172q-19 19-52.5 19T346 797l-11-11-43 43H137l120-120-4-4q-22-22-21.5-55.5T254 594l169-169Zm43-43 189-189q17-17 43-17t43 17l112 112q17 17 16.5 45.5T852 396L666 582 466 382Z" fill="white"/></svg> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.7956 3.52207L9.96143 2.33577C9.7926 2.22657 9.56544 2.27135 9.45405 2.43579L6.0984 7.24283C6.04007 7.32639 6.06267 7.44166 6.14824 7.49701L8.29131 8.88311C8.3727 8.93576 8.48117 8.91449 8.53666 8.835L11.8996 4.01753C12.011 3.85309 11.9644 3.63127 11.7956 3.52207Z" fill="black"/>
<path d="M7.93071 9.72518C7.98731 9.64163 7.96418 9.52789 7.87944 9.47309L5.73625 8.08691C5.65403 8.03373 5.54438 8.05603 5.48947 8.1371L4.86871 9.05349C4.81865 9.1274 4.83105 9.22628 4.89315 9.2904C5.10534 9.50952 5.20594 9.70268 5.19495 9.86988C5.18762 9.98137 5.12835 10.129 5.01713 10.3127C4.89153 10.5202 5.01598 10.8017 5.25808 10.8165L5.99295 10.8615C6.0891 10.8673 6.18089 10.8254 6.24775 10.756C6.34444 10.6557 6.43968 10.5825 6.53346 10.5365C6.64017 10.4841 6.82143 10.5299 7.07724 10.6738C7.16212 10.7215 7.27056 10.6997 7.32518 10.6191L7.93071 9.72518Z" fill="black"/>
<path d="M3.10001 12.4C2.82386 12.4 2.60001 12.6239 2.60001 12.9C2.60001 13.1761 2.82386 13.4 3.10001 13.4H12.9C13.1761 13.4 13.4 13.1761 13.4 12.9C13.4 12.6239 13.1761 12.4 12.9 12.4H3.10001Z" fill="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

View file

@ -1,5 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 4L12 4" stroke="white" stroke-linecap="round" stroke-linejoin="round"/> <path d="M4 4H12M4 8H10M4 12L12 12" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 8H10" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 12L12 12" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 203 B

Before After
Before After

View file

@ -1,5 +1,5 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 4L12 4" stroke="white" stroke-linecap="round" stroke-linejoin="round"/> <path d="M3.5 4C3.5 3.72386 3.72386 3.5 4 3.5H12C12.2761 3.5 12.5 3.72386 12.5 4C12.5 4.27614 12.2761 4.5 12 4.5H4C3.72386 4.5 3.5 4.27614 3.5 4Z" fill="white"/>
<path d="M6 8H12" stroke="white" stroke-linecap="round" stroke-linejoin="round"/> <path d="M5.5 8C5.5 7.72386 5.72386 7.5 6 7.5H12C12.2761 7.5 12.5 7.72386 12.5 8C12.5 8.27614 12.2761 8.5 12 8.5H6C5.72386 8.5 5.5 8.27614 5.5 8Z" fill="white"/>
<path d="M4 12L12 12" stroke="white" stroke-linecap="round" stroke-linejoin="round"/> <path d="M4 11.5C3.72386 11.5 3.5 11.7239 3.5 12C3.5 12.2761 3.72386 12.5 4 12.5L12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5L4 11.5Z" fill="white"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 608 B

Before After
Before After

View file

@ -1 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M90 1056V916h780v140H90Zm130-280 220-560h80l220 560h-75l-57-150H352l-57 150h-75Zm156-214h208L482 291h-4L376 562Z" fill="white"/></svg> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.72256 8.35194L10.7436 10.7504C10.861 11.0263 11.1785 11.1542 11.4526 11.0359C11.7267 10.9176 11.8537 10.5981 11.7362 10.3221L8.74448 3.29423C8.46396 2.63526 7.53604 2.63526 7.25552 3.29423L4.2638 10.3221C4.14632 10.5981 4.2733 10.9176 4.54741 11.0359C4.82152 11.1542 5.13896 11.0263 5.25644 10.7504L6.27746 8.3519C6.31072 8.35834 6.34506 8.36172 6.38019 8.36172H9.62007C9.65511 8.36172 9.68938 8.35836 9.72256 8.35194ZM6.73612 7.27446L8 4.30547L9.26388 7.27446H6.73612Z" fill="black"/>
<path d="M3.10001 12.4C2.82386 12.4 2.60001 12.6239 2.60001 12.9C2.60001 13.1761 2.82386 13.4 3.10001 13.4H12.9C13.1761 13.4 13.4 13.1761 13.4 12.9C13.4 12.6239 13.1761 12.4 12.9 12.4H3.10001Z" fill="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 850 B

Before After
Before After

View file

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.2981 4.30813C11.1363 4.14637 10.874 4.14637 10.7123 4.30813C10.5505 4.46989 10.5505 4.73216 10.7123 4.89392L11.8083 5.98994L7.99997 5.98993C7.77121 5.98993 7.58576 6.17538 7.58576 6.40415C7.58576 6.63291 7.77121 6.81836 7.99997 6.81836L11.8083 6.81836L10.7123 7.91438C10.5505 8.07614 10.5505 8.3384 10.7123 8.50016C10.874 8.66192 11.1363 8.66192 11.2981 8.50016L13.1012 6.69704C13.1789 6.61936 13.2225 6.514 13.2225 6.40415C13.2225 6.29429 13.1789 6.18894 13.1012 6.11126L11.2981 4.30813Z" fill="white"/>
<path d="M4.51023 11.4929C4.67199 11.6546 4.93425 11.6546 5.09601 11.4929C5.25777 11.3311 5.25777 11.0689 5.09601 10.9071L4 9.81109L7.80832 9.81109C8.03709 9.81109 8.22254 9.62564 8.22254 9.39687C8.22254 9.16811 8.03709 8.98266 7.80832 8.98266L4 8.98266L5.09601 7.88664C5.25777 7.72488 5.25777 7.46262 5.09601 7.30086C4.93425 7.1391 4.67199 7.1391 4.51023 7.30086L2.7071 9.10398C2.62942 9.18166 2.58578 9.28702 2.58578 9.39687C2.58578 9.50673 2.62942 9.61209 2.7071 9.68977L4.51023 11.4929Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.70001 9.35C6.70001 9.65375 6.94625 9.89999 7.25 9.89999C7.55375 9.89999 7.79999 9.65375 7.79999 9.35V4.13077H9.12307V9.36152C9.12307 9.65891 9.36415 9.89999 9.66154 9.89999C9.95893 9.89999 10.2 9.65891 10.2 9.36152V4.13077H11.2346C11.5469 4.13077 11.8 3.87764 11.8 3.56538C11.8 3.25313 11.5469 3 11.2346 3H7.00001C6.32309 3 5.43076 3.29233 5.10001 3.62307C4.61796 4.10513 4.40001 4.62307 4.40001 5.29999C4.40001 5.97691 4.51796 6.41794 5.00001 6.89999C5.48206 7.38204 6.02309 7.72187 6.70001 7.72187V9.35ZM5.7923 4.4923C6.03333 4.25128 6.36155 4.13077 6.70001 4.13077V6.5923C6.36155 6.5923 6.03333 6.47179 5.7923 6.23077C5.55128 5.98974 5.43076 5.7 5.43076 5.36154C5.43076 5.02307 5.55128 4.73333 5.7923 4.4923Z" fill="white"/>
<path d="M5.32179 9.49412C5.14266 9.33343 4.86817 9.34453 4.7026 9.51916L3.2851 11.0142C3.12814 11.1798 3.13651 11.4416 3.30372 11.5968L4.75774 12.9462C4.91486 13.0921 5.15507 13.1009 5.32247 12.967C5.52387 12.8058 5.54051 12.5054 5.35813 12.323L4.80002 11.7649L12.5196 11.7284C12.7853 11.7272 13 11.5114 13 11.2457C13 10.9792 12.7839 10.763 12.5173 10.763L4.72295 10.763L5.34119 10.1372C5.51955 9.95662 5.51071 9.6636 5.32179 9.49412Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.4974 12.8863C11.3319 13.0609 11.0574 13.072 10.8782 12.9113V12.9113C10.6893 12.7419 10.6805 12.4488 10.8588 12.2683L11.4771 11.6424H3.68272C3.41613 11.6424 3.20001 11.4263 3.20001 11.1597V11.1597C3.20001 10.894 3.41474 10.6783 3.68044 10.677L11.4 10.6405L10.8419 10.0824C10.6595 9.90005 10.6762 9.59963 10.8776 9.4385V9.4385C11.045 9.30458 11.2852 9.3134 11.4423 9.45923L12.8963 10.8087C13.0635 10.9639 13.0719 11.2257 12.9149 11.3912L11.4974 12.8863Z" fill="white"/>
<path d="M6.85 9.89999C6.54624 9.89999 6.30001 9.65375 6.30001 9.35V7.72187C5.62308 7.72187 5.08206 7.38204 4.6 6.89999C4.11795 6.41794 4 5.97691 4 5.29999C4 4.62307 4.21795 4.10513 4.70001 3.62307C5.03075 3.29233 5.92308 3 6.60001 3H10.8346C11.1469 3 11.4 3.25313 11.4 3.56538V3.56538C11.4 3.87764 11.1469 4.13077 10.8346 4.13077H9.8V9.36152C9.8 9.65891 9.55892 9.89999 9.26153 9.89999V9.89999C8.96414 9.89999 8.72306 9.65891 8.72306 9.36152V4.13077H7.39999V9.35C7.39999 9.65375 7.15375 9.89999 6.85 9.89999V9.89999ZM6.30001 6.5923V4.13077C5.96154 4.13077 5.63332 4.25128 5.39229 4.4923C5.15127 4.73333 5.03075 5.02307 5.03075 5.36154C5.03075 5.7 5.15127 5.98974 5.39229 6.23077C5.63332 6.47179 5.96154 6.5923 6.30001 6.5923Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -1,26 +1,22 @@
import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter/material.dart';
final List<ToolbarItem> alignmentItems = [ final List<ToolbarItem> alignmentItems = [
_AlignmentToolbarItem( _AlignmentToolbarItem(
id: 'align_left', id: 'align_left',
name: 'left', name: 'left',
tooltip: 'left', tooltip: 'left',
icon: Icons.format_align_left,
align: 'left', align: 'left',
), ),
_AlignmentToolbarItem( _AlignmentToolbarItem(
id: 'align_center', id: 'align_center',
name: 'center', name: 'center',
tooltip: 'center', tooltip: 'center',
icon: Icons.format_align_center,
align: 'center', align: 'center',
), ),
_AlignmentToolbarItem( _AlignmentToolbarItem(
id: 'align_right', id: 'align_right',
name: 'right', name: 'right',
tooltip: 'right', tooltip: 'right',
icon: Icons.format_align_right,
align: 'right', align: 'right',
), ),
]; ];
@ -30,7 +26,6 @@ class _AlignmentToolbarItem extends ToolbarItem {
required String id, required String id,
required String name, required String name,
required String tooltip, required String tooltip,
required IconData icon,
required String align, required String align,
}) : super( }) : super(
id: 'editor.$id', id: 'editor.$id',
@ -42,12 +37,9 @@ class _AlignmentToolbarItem extends ToolbarItem {
final isHighlight = nodes.every( final isHighlight = nodes.every(
(n) => n.attributes[blockComponentAlign] == align, (n) => n.attributes[blockComponentAlign] == align,
); );
return SVGIconItemWidget( return SVGIconItemWidget(
iconBuilder: (_) => Icon( iconName: 'toolbar/$name',
icon,
size: 16,
color: isHighlight ? highlightColor : Colors.white,
),
isHighlight: isHighlight, isHighlight: isHighlight,
highlightColor: highlightColor, highlightColor: highlightColor,
tooltip: tooltip, tooltip: tooltip,

View file

@ -1,5 +1,4 @@
import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter/material.dart';
ToolbarItem buildHighlightColorItem({List<ColorOption>? colorOptions}) { ToolbarItem buildHighlightColorItem({List<ColorOption>? colorOptions}) {
return ToolbarItem( return ToolbarItem(
@ -19,7 +18,6 @@ ToolbarItem buildHighlightColorItem({List<ColorOption>? colorOptions}) {
}); });
return SVGIconItemWidget( return SVGIconItemWidget(
iconName: 'toolbar/highlight_color', iconName: 'toolbar/highlight_color',
iconSize: const Size.square(14),
isHighlight: isHighlight, isHighlight: isHighlight,
highlightColor: highlightColor, highlightColor: highlightColor,
tooltip: AppFlowyEditorLocalizations.current.highlightColor, tooltip: AppFlowyEditorLocalizations.current.highlightColor,

View file

@ -1,5 +1,4 @@
import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter/material.dart';
ToolbarItem buildTextColorItem({ ToolbarItem buildTextColorItem({
List<ColorOption>? colorOptions, List<ColorOption>? colorOptions,
@ -22,7 +21,6 @@ ToolbarItem buildTextColorItem({
iconName: 'toolbar/text_color', iconName: 'toolbar/text_color',
isHighlight: isHighlight, isHighlight: isHighlight,
highlightColor: highlightColor, highlightColor: highlightColor,
iconSize: const Size.square(14),
tooltip: AppFlowyEditorLocalizations.current.textColor, tooltip: AppFlowyEditorLocalizations.current.textColor,
onPressed: () { onPressed: () {
bool showClearButton = false; bool showClearButton = false;

View file

@ -1,24 +1,23 @@
import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter/material.dart';
final List<ToolbarItem> textDirectionItems = [ final List<ToolbarItem> textDirectionItems = [
_TextDirectionToolbarItem( _TextDirectionToolbarItem(
id: 'text_direction_auto', id: 'text_direction_auto',
name: blockComponentTextDirectionAuto, name: blockComponentTextDirectionAuto,
tooltip: AppFlowyEditorLocalizations.current.auto, tooltip: AppFlowyEditorLocalizations.current.auto,
icon: Icons.swap_horiz, iconName: 'text_direction_auto',
), ),
_TextDirectionToolbarItem( _TextDirectionToolbarItem(
id: 'text_direction_ltr', id: 'text_direction_ltr',
name: blockComponentTextDirectionLTR, name: blockComponentTextDirectionLTR,
tooltip: AppFlowyEditorLocalizations.current.ltr, tooltip: AppFlowyEditorLocalizations.current.ltr,
icon: Icons.format_textdirection_l_to_r, iconName: 'text_direction_left',
), ),
_TextDirectionToolbarItem( _TextDirectionToolbarItem(
id: 'text_direction_rtl', id: 'text_direction_rtl',
name: blockComponentTextDirectionRTL, name: blockComponentTextDirectionRTL,
tooltip: AppFlowyEditorLocalizations.current.rtl, tooltip: AppFlowyEditorLocalizations.current.rtl,
icon: Icons.format_textdirection_r_to_l, iconName: 'text_direction_right',
), ),
]; ];
@ -27,7 +26,7 @@ class _TextDirectionToolbarItem extends ToolbarItem {
required String id, required String id,
required String name, required String name,
required String tooltip, required String tooltip,
required IconData icon, required String iconName,
}) : super( }) : super(
id: 'editor.$id', id: 'editor.$id',
group: 7, group: 7,
@ -39,11 +38,7 @@ class _TextDirectionToolbarItem extends ToolbarItem {
(n) => n.attributes[blockComponentTextDirection] == name, (n) => n.attributes[blockComponentTextDirection] == name,
); );
return SVGIconItemWidget( return SVGIconItemWidget(
iconBuilder: (_) => Icon( iconName: 'toolbar/$iconName',
icon,
size: 16,
color: isHighlight ? highlightColor : Colors.white,
),
isHighlight: isHighlight, isHighlight: isHighlight,
highlightColor: highlightColor, highlightColor: highlightColor,
tooltip: tooltip, tooltip: tooltip,

View file

@ -1,6 +1,6 @@
name: appflowy_editor name: appflowy_editor
description: A highly customizable rich-text editor for Flutter. The AppFlowy Editor project for AppFlowy and beyond. description: A highly customizable rich-text editor for Flutter. The AppFlowy Editor project for AppFlowy and beyond.
version: 1.3.0 version: 1.4.0
homepage: https://github.com/AppFlowy-IO/appflowy-editor homepage: https://github.com/AppFlowy-IO/appflowy-editor
platforms: platforms: