Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: flutter analyze and flutter format
Lucas.Xu2d61581eb386
diff --git a/.github/workflows/flowy_editor_test.yml b/.github/workflows/appflowy_editor_test.ymlsimilarity index 90%rename from .github/workflows/flowy_editor_test.ymlrename to .github/workflows/appflowy_editor_test.ymlindex 450f72e61d..80b9337f7b 100644--- a/.github/workflows/flowy_editor_test.yml+++ b/.github/workflows/appflowy_editor_test.yml@@ -1,4 +1,4 @@-name: FlowyEditor test+name: AppFlowyEditor teston:push:@@ -37,6 +37,8 @@ jobs:working-directory: frontend/app_flowy/packages/appflowy_editorrun: |flutter pub get+ flutter format --set-exit-if-changed .+ flutter analyze .flutter test --coverage- uses: codecov/codecov-action@v3diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/rich_text/built_in_text_widget.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/rich_text/built_in_text_widget.dartindex f2c8693f87..a0a65d9583 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/rich_text/built_in_text_widget.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/rich_text/built_in_text_widget.dart@@ -1,5 +1,4 @@import 'package:appflowy_editor/appflowy_editor.dart';-import 'package:appflowy_editor/src/render/rich_text/default_selectable.dart';import 'package:flutter/material.dart';abstract class BuiltInTextWidget extends StatefulWidget {diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_widget.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_widget.dartindex c5a35ef73c..6bce03d15a 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_widget.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/selection_menu/selection_menu_widget.dart@@ -7,10 +7,10 @@ import 'package:flutter/material.dart';import 'package:flutter/services.dart';typedef SelectionMenuItemHandler = void Function(- EditorState editorState,- SelectionMenuService menuService,- BuildContext context,- );+ EditorState editorState,+ SelectionMenuService menuService,+ BuildContext context,+);/// Selection Menu Itemclass SelectionMenuItem {@@ -23,7 +23,7 @@ class SelectionMenuItem {this.handler = (editorState, menuService, context) {_deleteToSlash(editorState);WidgetsBinding.instance.addPostFrameCallback((timeStamp) {- handler(editorState, menuService, context);+ handler(editorState, menuService, context);});};}diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dartindex e48ec3426d..916ffe317e 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart@@ -1,7 +1,6 @@import 'package:appflowy_editor/appflowy_editor.dart';import 'package:appflowy_editor/src/infra/html_converter.dart';import 'package:appflowy_editor/src/document/node_iterator.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';import 'package:appflowy_editor/src/service/internal_key_event_handlers/number_list_helper.dart';import 'package:flutter/material.dart';import 'package:rich_clipboard/rich_clipboard.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dartindex c31b8c3699..2a2d1deedb 100644--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/enter_without_shift_in_text_node_handler.dart@@ -3,7 +3,6 @@ import 'dart:collection';import 'package:appflowy_editor/appflowy_editor.dart';import 'package:flutter/material.dart';-import 'package:appflowy_editor/src/extensions/path_extensions.dart';import './number_list_helper.dart';/// Handle some cases where enter is pressed and shift is not pressed.diff --git a/frontend/app_flowy/packages/appflowy_editor/test/extensions/path_extensions_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/extensions/path_extensions_test.dartindex c39c0d0e56..5d84690641 100644--- a/frontend/app_flowy/packages/appflowy_editor/test/extensions/path_extensions_test.dart+++ b/frontend/app_flowy/packages/appflowy_editor/test/extensions/path_extensions_test.dart@@ -1,6 +1,5 @@import 'package:appflowy_editor/appflowy_editor.dart';import 'package:flutter_test/flutter_test.dart';-import 'package:appflowy_editor/src/extensions/path_extensions.dart';void main() async {setUpAll(() {diff --git a/frontend/app_flowy/packages/appflowy_editor/test/render/rich_text/checkbox_text_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/render/rich_text/checkbox_text_test.dartindex 96cdbbce65..29dfbba136 100644--- a/frontend/app_flowy/packages/appflowy_editor/test/render/rich_text/checkbox_text_test.dart+++ b/frontend/app_flowy/packages/appflowy_editor/test/render/rich_text/checkbox_text_test.dart@@ -1,6 +1,4 @@import 'package:appflowy_editor/appflowy_editor.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';-import 'package:appflowy_editor/src/render/rich_text/default_selectable.dart';import 'package:appflowy_editor/src/extensions/text_node_extensions.dart';import 'package:flutter_test/flutter_test.dart';import '../../infra/test_editor.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/test/render/rich_text/toolbar_rich_text_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/render/rich_text/toolbar_rich_text_test.dartindex 9e8a5c15c9..c9d9ef9e70 100644--- a/frontend/app_flowy/packages/appflowy_editor/test/render/rich_text/toolbar_rich_text_test.dart+++ b/frontend/app_flowy/packages/appflowy_editor/test/render/rich_text/toolbar_rich_text_test.dart@@ -1,5 +1,4 @@import 'package:appflowy_editor/appflowy_editor.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';import 'package:appflowy_editor/src/extensions/text_node_extensions.dart';import 'package:appflowy_editor/src/render/toolbar/toolbar_item_widget.dart';import 'package:appflowy_editor/src/render/toolbar/toolbar_widget.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/backspace_handler_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/backspace_handler_test.dartindex 37ad7bade3..1e423c39e0 100644--- a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/backspace_handler_test.dart+++ b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/backspace_handler_test.dart@@ -2,7 +2,6 @@ import 'dart:collection';import 'package:appflowy_editor/appflowy_editor.dart';import 'package:appflowy_editor/src/render/image/image_node_widget.dart';-import 'package:appflowy_editor/src/render/rich_text/flowy_rich_text.dart';import 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import 'package:network_image_mock/network_image_mock.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/format_style_handler_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/format_style_handler_test.dartindex 7240c186f3..0cb4c71600 100644--- a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/format_style_handler_test.dart+++ b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/format_style_handler_test.dart@@ -8,7 +8,6 @@ import 'package:flutter/material.dart';import 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import '../../infra/test_editor.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';void main() async {setUpAll(() {diff --git a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/slash_handler_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/slash_handler_test.dartindex 4d5492e620..b3166a46fb 100644--- a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/slash_handler_test.dart+++ b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/slash_handler_test.dart@@ -1,7 +1,6 @@import 'package:appflowy_editor/appflowy_editor.dart';import 'package:appflowy_editor/src/render/selection_menu/selection_menu_item_widget.dart';import 'package:appflowy_editor/src/render/selection_menu/selection_menu_service.dart';-import 'package:appflowy_editor/src/render/selection_menu/selection_menu_widget.dart';import 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import '../../infra/test_editor.dart';diff --git a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/white_space_handler_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/white_space_handler_test.dartindex fd7707a5f5..c0948a93c5 100644--- a/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/white_space_handler_test.dart+++ b/frontend/app_flowy/packages/appflowy_editor/test/service/internal_key_event_handlers/white_space_handler_test.dart@@ -3,7 +3,6 @@ import 'package:appflowy_editor/src/service/internal_key_event_handlers/whitespaimport 'package:flutter/services.dart';import 'package:flutter_test/flutter_test.dart';import '../../infra/test_editor.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';void main() async {setUpAll(() {diff --git a/frontend/app_flowy/packages/appflowy_editor/test/service/toolbar_service_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/service/toolbar_service_test.dartindex 5b82a5dea9..1e8f2f1f07 100644--- a/frontend/app_flowy/packages/appflowy_editor/test/service/toolbar_service_test.dart+++ b/frontend/app_flowy/packages/appflowy_editor/test/service/toolbar_service_test.dart@@ -4,7 +4,6 @@ import 'package:appflowy_editor/src/render/toolbar/toolbar_item_widget.dart';import 'package:appflowy_editor/src/render/toolbar/toolbar_widget.dart';import 'package:flutter_test/flutter_test.dart';import '../infra/test_editor.dart';-import 'package:appflowy_editor/src/document/built_in_attribute_keys.dart';void main() async {setUpAll(() {