Skip to content

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.

chore: upgrade minimum support flutter version, >= 3.3.0 (#1551)

Lucas.Xuc05c1e191cb4
diff --git a/.github/workflows/appflowy_editor_test.yml b/.github/workflows/appflowy_editor_test.yml
index 4ad3600297..5a729ebe88 100644
--- a/.github/workflows/appflowy_editor_test.yml
+++ b/.github/workflows/appflowy_editor_test.yml
@@ -30,7 +30,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- flutter-version: "3.0.5"
+ flutter-version: "3.3.9"
cache: true
- name: Run FlowyEditor tests
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 174c7434a7..d5486c0b63 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -38,7 +38,7 @@ jobs:
with:
channel: "stable"
cache: true
- flutter-version: "3.0.5"
+ flutter-version: "3.3.9"
- name: Cache Cargo
id: cache-cargo
diff --git a/.github/workflows/dart_lint.yml b/.github/workflows/dart_lint.yml
index 60f5408a87..7a9e4a0490 100644
--- a/.github/workflows/dart_lint.yml
+++ b/.github/workflows/dart_lint.yml
@@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
- flutter-version: "3.0.5"
+ flutter-version: "3.3.9"
channel: "stable"
- uses: actions-rs/toolchain@v1
with:
diff --git a/.github/workflows/dart_test.yml b/.github/workflows/dart_test.yml
index 39b3fb6b89..978ebe4696 100644
--- a/.github/workflows/dart_test.yml
+++ b/.github/workflows/dart_test.yml
@@ -30,7 +30,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- flutter-version: "3.0.5"
+ flutter-version: "3.3.9"
cache: true
- name: Cache Cargo
diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml
index e2a0d3221a..5ba7714e28 100644
--- a/.github/workflows/integration_test.yml
+++ b/.github/workflows/integration_test.yml
@@ -35,7 +35,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- flutter-version: "3.0.5"
+ flutter-version: "3.3.9"
cache: true
- name: Cache Cargo
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c13d856f21..72aadb4383 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -51,7 +51,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- flutter-version: '3.0.5'
+ flutter-version: '3.3.9'
- name: Pre build
working-directory: frontend
@@ -136,7 +136,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- flutter-version: '3.0.5'
+ flutter-version: '3.3.9'
- name: Pre build
working-directory: frontend
@@ -211,7 +211,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- flutter-version: '3.0.5'
+ flutter-version: '3.3.9'
- name: Pre build
working-directory: frontend
@@ -284,7 +284,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- flutter-version: '3.0.5'
+ flutter-version: '3.3.9'
- name: Pre build
working-directory: frontend
diff --git a/.github/workflows/rust_coverage.yml b/.github/workflows/rust_coverage.yml
index cad1af4a6c..578368ac15 100644
--- a/.github/workflows/rust_coverage.yml
+++ b/.github/workflows/rust_coverage.yml
@@ -49,7 +49,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- flutter-version: '3.0.5'
+ flutter-version: '3.3.9'
- name: Install code-coverage tools
working-directory: frontend
diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml
index 71572ea9b8..f7e20647d1 100644
--- a/.github/workflows/rust_lint.yml
+++ b/.github/workflows/rust_lint.yml
@@ -32,7 +32,7 @@ jobs:
override: true
- uses: subosito/flutter-action@v1
with:
- flutter-version: '3.0.5'
+ flutter-version: '3.3.9'
channel: "stable"
- name: Rust Deps
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/board_page.dart b/frontend/app_flowy/lib/plugins/board/presentation/board_page.dart
index f1bd518733..b85ca117ec 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/board_page.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/board_page.dart
@@ -20,7 +20,6 @@ import 'package:flowy_sdk/protobuf/flowy-grid/field_entities.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-grid/row_entities.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
-import '../../grid/application/row/row_cache.dart';
import '../application/board_bloc.dart';
import 'card/card.dart';
import 'card/card_cell_builder.dart';
diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart
index 74a0fd725b..82514da3d5 100644
--- a/frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart
+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart
@@ -41,8 +41,8 @@ class DateCalBloc extends Bloc<DateCalEvent, DateCalState> {
},
didReceiveCellUpdate: (DateCellDataPB? cellData) {
final calData = calDataFromCellData(cellData);
- final time =
- calData.foldRight("", (dateData, previous) => dateData.time);
+ final time = calData.foldRight(
+ "", (dateData, previous) => dateData.time ?? '');
emit(state.copyWith(calData: calData, time: time));
},
setIncludeTime: (includeTime) async {
@@ -224,7 +224,8 @@ class DateCalState with _$DateCalState {
DateCellDataPB? cellData,
) {
Option<CalendarData> calData = calDataFromCellData(cellData);
- final time = calData.foldRight("", (dateData, previous) => dateData.time);
+ final time =
+ calData.foldRight("", (dateData, previous) => dateData.time ?? '');
return DateCalState(
dateTypeOptionPB: dateTypeOptionPB,
format: CalendarFormat.month,
diff --git a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_file_customize_location_view.dart b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_file_customize_location_view.dart
index 85b184300f..99323f0f43 100644
--- a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_file_customize_location_view.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_file_customize_location_view.dart
@@ -13,7 +13,6 @@ import '../../../../main.dart';
import '../../../../startup/launch_configuration.dart';
import '../../../../startup/startup.dart';
import '../../../../startup/tasks/prelude.dart';
-import '../../../application/settings/settings_location_cubit.dart';
class SettingsFileLocationCustomzier extends StatefulWidget {
const SettingsFileLocationCustomzier({
diff --git a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart
index 7b7855fb9c..c6987f6e6e 100644
--- a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_user_view.dart
@@ -80,7 +80,7 @@ class _CurrentIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
- _setIcon(String iconUrl) {
+ void setIcon(String iconUrl) {
context
.read<SettingsUserViewBloc>()
.add(SettingsUserEvent.updateUserIcon(iconUrl));
@@ -90,23 +90,28 @@ class _CurrentIcon extends StatelessWidget {
return Material(
color: Colors.transparent,
child: GestureDetector(
- onTap: () {
- showDialog(
- context: context,
- builder: (BuildContext context) {
- return SimpleDialog(
- title: FlowyText.medium(
- 'Select an Icon',
- fontSize: FontSizes.s16,
- ),
- children: <Widget>[
- SizedBox(
- height: 300, width: 300, child: IconGallery(_setIcon))
- ]);
- },
- );
- },
- child: Column(children: <Widget>[
+ onTap: () {
+ showDialog(
+ context: context,
+ builder: (BuildContext context) {
+ return SimpleDialog(
+ title: FlowyText.medium(
+ 'Select an Icon',
+ fontSize: FontSizes.s16,
+ ),
+ children: <Widget>[
+ SizedBox(
+ height: 300,
+ width: 300,
+ child: IconGallery(setIcon),
+ )
+ ],
+ );
+ },
+ );
+ },
+ child: Column(
+ children: <Widget>[
const Align(
alignment: Alignment.topLeft,
child: Text(
@@ -114,14 +119,17 @@ class _CurrentIcon extends StatelessWidget {
style: TextStyle(color: Colors.grey),
)),
Align(
- alignment: Alignment.centerLeft,
- child: Container(
- margin: const EdgeInsets.all(5.0),
- decoration:
- BoxDecoration(border: Border.all(color: Colors.grey)),
- child: svgWidget('emoji/$iconUrl', size: const Size(60, 60)),
- )),
- ])),
+ alignment: Alignment.centerLeft,
+ child: Container(
+ margin: const EdgeInsets.all(5.0),
+ decoration:
+ BoxDecoration(border: Border.all(color: Colors.grey)),
+ child: svgWidget('emoji/$iconUrl', size: const Size(60, 60)),
+ ),
+ ),
+ ],
+ ),
+ ),
);
}
}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/rendering/board_overlay.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/rendering/board_overlay.dart
index f2c99e057b..7c069fa491 100644
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/rendering/board_overlay.dart
+++ b/frontend/app_flowy/packages/appflowy_board/lib/src/rendering/board_overlay.dart
@@ -1,5 +1,4 @@
import 'dart:collection';
-import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/scheduler.dart';
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/input_service.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/input_service.dart
index 4933866c31..e3665650b4 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/input_service.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/input_service.dart
@@ -68,7 +68,7 @@ class _AppFlowyInputState extends State<AppFlowyInput>
final Map<ShortcutActivator, Intent> _shortcuts = kIsWeb
? {
LogicalKeySet(LogicalKeyboardKey.space):
- DoNothingAndStopPropagationIntent(),
+ const DoNothingAndStopPropagationIntent(),
}
: {};
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/scroll_service.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/scroll_service.dart
index f00edc4a56..73d463b3b7 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/scroll_service.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/scroll_service.dart
@@ -92,6 +92,7 @@ class _AppFlowyScrollState extends State<AppFlowyScroll>
Widget build(BuildContext context) {
return Listener(
onPointerSignal: _onPointerSignal,
+ onPointerPanZoomUpdate: _onPointerPanZoomUpdate,
child: CustomScrollView(
key: _scrollViewKey,
physics: const NeverScrollableScrollPhysics(),
@@ -134,4 +135,11 @@ class _AppFlowyScrollState extends State<AppFlowyScroll>
scrollTo(dy);
}
}
+
+ void _onPointerPanZoomUpdate(PointerPanZoomUpdateEvent event) {
+ if (_scrollEnabled) {
+ final dy = (_scrollController.position.pixels - event.panDelta.dy);
+ scrollTo(dy);
+ }
+ }
}
diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/selection/selection_gesture.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/selection/selection_gesture.dart
index e233b35446..09cc624b7e 100644
--- a/frontend/app_flowy/packages/appflowy_editor/lib/src/service/selection/selection_gesture.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/service/selection/selection_gesture.dart
@@ -49,7 +49,14 @@ class SelectionGestureDetectorState extends State<SelectionGestureDetector> {
gestures: {
PanGestureRecognizer:
GestureRecognizerFactoryWithHandlers<PanGestureRecognizer>(
- () => PanGestureRecognizer(),
+ () => PanGestureRecognizer(supportedDevices: {
+ // https://docs.flutter.dev/release/breaking-changes/trackpad-gestures#for-gesture-interactions-not-suitable-for-trackpad-usage
+ // Exclude PointerDeviceKind.trackpad.
+ PointerDeviceKind.touch,
+ PointerDeviceKind.mouse,
+ PointerDeviceKind.stylus,
+ PointerDeviceKind.invertedStylus,
+ }),
(recognizer) {
recognizer
..onStart = widget.onPanStart
diff --git a/frontend/app_flowy/packages/appflowy_editor/pubspec.yaml b/frontend/app_flowy/packages/appflowy_editor/pubspec.yaml
index 04a31d29e5..1602da9e06 100644
--- a/frontend/app_flowy/packages/appflowy_editor/pubspec.yaml
+++ b/frontend/app_flowy/packages/appflowy_editor/pubspec.yaml
@@ -10,8 +10,8 @@ platforms:
web:
environment:
- sdk: ">=2.17.0 <3.0.0"
- flutter: ">=1.17.0"
+ sdk: ">=2.18.0 <3.0.0"
+ flutter: ">=3.3.0"
dependencies:
flutter:
diff --git a/frontend/app_flowy/packages/appflowy_editor/test/legacy/undo_manager_test.dart b/frontend/app_flowy/packages/appflowy_editor/test/legacy/undo_manager_test.dart
index 7fbf4ec162..6c7332164f 100644
--- a/frontend/app_flowy/packages/appflowy_editor/test/legacy/undo_manager_test.dart
+++ b/frontend/app_flowy/packages/appflowy_editor/test/legacy/undo_manager_test.dart
@@ -8,7 +8,7 @@ void main() async {
TestWidgetsFlutterBinding.ensureInitialized();
});
- Node _createEmptyEditorRoot() {
+ Node createEmptyEditorRoot() {
return Node(
type: 'editor',
children: LinkedList(),
@@ -17,7 +17,7 @@ void main() async {
}
test("HistoryItem #1", () {
- final document = Document(root: _createEmptyEditorRoot());
+ final document = Document(root: createEmptyEditorRoot());
final editorState = EditorState(document: document);
final historyItem = HistoryItem();
@@ -35,7 +35,7 @@ void main() async {
});
test("HistoryItem #2", () {
- final document = Document(root: _createEmptyEditorRoot());
+ final document = Document(root: createEmptyEditorRoot());
final editorState = EditorState(document: document);
final historyItem = HistoryItem();
diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/code_block/code_block_node_widget.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/code_block/code_block_node_widget.dart
index 75a0fd48ee..73676ee95d 100644
--- a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/code_block/code_block_node_widget.dart
+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/code_block/code_block_node_widget.dart
@@ -162,7 +162,7 @@ class __CodeBlockNodeWidgeState extends State<_CodeBlockNodeWidge>
var currentSpans = spans;
List<List<TextSpan>> stack = [];
- _traverse(highlight.Node node) {
+ void traverse(highlight.Node node) {
if (node.value != null) {
currentSpans.add(node.className == null
? TextSpan(text: node.value)
@@ -177,7 +177,7 @@ class __CodeBlockNodeWidgeState extends State<_CodeBlockNodeWidge>
currentSpans = tmp;
for (var n in node.children!) {
- _traverse(n);
+ traverse(n);
if (n == node.children!.last) {
currentSpans = stack.isEmpty ? spans : stack.removeLast();
}
@@ -186,7 +186,7 @@ class __CodeBlockNodeWidgeState extends State<_CodeBlockNodeWidge>
}
for (var node in nodes) {
- _traverse(node);
+ traverse(node);
}
return spans;
diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml b/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml
index 58105b3cc3..ccd37fb96f 100644
--- a/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml
+++ b/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml
@@ -6,8 +6,8 @@ homepage: https://github.com/AppFlowy-IO/AppFlowy
publish_to: none
environment:
- sdk: ">=2.17.6 <3.0.0"
- flutter: ">=1.17.0"
+ sdk: ">=2.18.0 <3.0.0"
+ flutter: ">=3.3.0"
dependencies:
flutter:
diff --git a/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/src/method_channel_flowy_infra_ui.dart b/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/src/method_channel_flowy_infra_ui.dart
index ad8051f515..7062155e23 100644
--- a/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/src/method_channel_flowy_infra_ui.dart
+++ b/frontend/app_flowy/packages/flowy_infra_ui/flowy_infra_ui_platform_interface/lib/src/method_channel_flowy_infra_ui.dart
@@ -1,16 +1,16 @@
import 'package:flowy_infra_ui_platform_interface/flowy_infra_ui_platform_interface.dart';
import 'package:flutter/services.dart';
-import '../flowy_infra_ui_platform_interface.dart';
-
// ignore_for_file: constant_identifier_names
const INFRA_UI_METHOD_CHANNEL_NAME = 'flowy_infra_ui_method';
const INFRA_UI_KEYBOARD_EVENT_CHANNEL_NAME = 'flowy_infra_ui_event/keyboard';
const INFRA_UI_METHOD_GET_PLATFORM_VERSION = 'getPlatformVersion';
class MethodChannelFlowyInfraUI extends FlowyInfraUIPlatform {
- final MethodChannel _methodChannel = const MethodChannel(INFRA_UI_METHOD_CHANNEL_NAME);
- final EventChannel _keyboardChannel = const EventChannel(INFRA_UI_KEYBOARD_EVENT_CHANNEL_NAME);
+ final MethodChannel _methodChannel =
+ const MethodChannel(INFRA_UI_METHOD_CHANNEL_NAME);
+ final EventChannel _keyboardChannel =
+ const EventChannel(INFRA_UI_KEYBOARD_EVENT_CHANNEL_NAME);
late final Stream<bool> _onKeyboardVisibilityChange =
_keyboardChannel.receiveBroadcastStream().map((event) => event as bool);
@@ -20,7 +20,8 @@ class MethodChannelFlowyInfraUI extends FlowyInfraUIPlatform {
@override
Future<String> getPlatformVersion() async {
- String? version = await _methodChannel.invokeMethod<String>(INFRA_UI_METHOD_GET_PLATFORM_VERSION);
+ String? version = await _methodChannel
+ .invokeMethod<String>(INFRA_UI_METHOD_GET_PLATFORM_VERSION);
return version ?? 'unknow';
}
}
diff --git a/frontend/app_flowy/pubspec.lock b/frontend/app_flowy/pubspec.lock
index 13218b2051..eb0ea0d1b5 100644
--- a/frontend/app_flowy/pubspec.lock
+++ b/frontend/app_flowy/pubspec.lock
@@ -9,7 +9,7 @@ packages:
source: hosted
version: "46.0.0"
analyzer:
- dependency: "direct overridden"
+ dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
@@ -56,7 +56,7 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
- version: "3.1.11"
+ version: "3.3.0"
args:
dependency: transitive
description:
@@ -70,7 +70,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.8.2"
+ version: "2.9.0"
bloc:
dependency: "direct main"
description:
@@ -154,7 +154,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
charcode:
dependency: "direct main"
description:
@@ -182,7 +182,7 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
code_builder:
dependency: transitive
description:
@@ -252,14 +252,14 @@ packages:
name: coverage
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.5.0"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
csslib:
dependency: transitive
description:
@@ -378,7 +378,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.0"
+ version: "1.3.1"
ffi:
dependency: transitive
description:
@@ -714,21 +714,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.11"
+ version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
- version: "0.1.4"
+ version: "0.1.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.7.0"
+ version: "1.8.0"
mime:
dependency: transitive
description:
@@ -819,7 +819,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.8.1"
+ version: "1.8.2"
path_drawing:
dependency: transitive
description:
@@ -1153,7 +1153,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
- version: "1.8.2"
+ version: "1.9.0"
stack_trace:
dependency: transitive
description:
@@ -1181,7 +1181,7 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
styled_widget:
dependency: "direct main"
description:
@@ -1195,7 +1195,7 @@ packages:
name: sync_http
url: "https://pub.dartlang.org"
source: hosted
- version: "0.3.0"
+ version: "0.3.1"
table_calendar:
dependency: "direct main"
description:
@@ -1209,28 +1209,28 @@ packages:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
test:
dependency: transitive
description:
name: test
url: "https://pub.dartlang.org"
source: hosted
- version: "1.21.1"
+ version: "1.21.4"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
- version: "0.4.9"
+ version: "0.4.12"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
- version: "0.4.13"
+ version: "0.4.16"
textfield_tags:
dependency: "direct main"
description:
@@ -1272,7 +1272,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.0"
+ version: "1.3.1"
universal_platform:
dependency: transitive
description:
@@ -1356,7 +1356,7 @@ packages:
name: vm_service
url: "https://pub.dartlang.org"
source: hosted
- version: "8.2.2"
+ version: "9.0.0"
watcher:
dependency: transitive
description:
@@ -1423,5 +1423,5 @@ packages:
source: hosted
version: "3.1.1"
sdks:
- dart: ">=2.17.6 <3.0.0"
- flutter: ">=3.0.0"
+ dart: ">=2.18.0 <3.0.0"
+ flutter: ">=3.3.0"
diff --git a/frontend/app_flowy/pubspec.yaml b/frontend/app_flowy/pubspec.yaml
index 608e7cf823..d31fd86258 100644
--- a/frontend/app_flowy/pubspec.yaml
+++ b/frontend/app_flowy/pubspec.yaml
@@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
- sdk: ">=2.17.0 <3.0.0"
+ sdk: ">=2.18.0 <3.0.0"
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
@@ -105,9 +105,6 @@ dev_dependencies:
freezed: ^2.1.0+1
bloc_test: ^9.0.2
-dependency_overrides:
- analyzer: ">=4.4.0 <5.0.0"
-
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
diff --git a/frontend/rust-lib/dart-ffi/Cargo.toml b/frontend/rust-lib/dart-ffi/Cargo.toml
index 71f64fb101..a8b3892ac2 100644
--- a/frontend/rust-lib/dart-ffi/Cargo.toml
+++ b/frontend/rust-lib/dart-ffi/Cargo.toml
@@ -27,7 +27,7 @@ parking_lot = "0.12.1"
lib-dispatch = { path = "../lib-dispatch" }
flowy-sdk = { path = "../flowy-sdk" }
-dart-notify = { path = "../dart-notify", feature = ["dart"] }
+dart-notify = { path = "../dart-notify" }
flowy-derive = { path = "../flowy-derive" }
[features]
diff --git a/frontend/scripts/makefile/desktop.toml b/frontend/scripts/makefile/desktop.toml
index 89c23b96b3..d27a80e059 100644
--- a/frontend/scripts/makefile/desktop.toml
+++ b/frontend/scripts/makefile/desktop.toml
@@ -6,7 +6,14 @@
[tasks.env_check]
dependencies = ["echo_env", "install_protobuf"]
-condition = { env_set = [ "BUILD_FLAG", "RUST_COMPILE_TARGET", "CRATE_TYPE", "TARGET_OS"], channels = ["stable"] }
+condition = { env_set = [
+ "BUILD_FLAG",
+ "RUST_COMPILE_TARGET",
+ "CRATE_TYPE",
+ "TARGET_OS",
+], channels = [
+ "stable",
+] }
[tasks.appflowy-sdk-dev]
mac_alias = "appflowy-sdk-dev-macos"
@@ -16,22 +23,41 @@ linux_alias = "appflowy-sdk-dev-linux"
[tasks.appflowy-sdk-dev-android]
category = "Build"
dependencies = ["env_check"]
-run_task = { name = ["setup-crate-type","sdk-build-android", "restore-crate-type"] }
+run_task = { name = [
+ "setup-crate-type",
+ "sdk-build-android",
+ "restore-crate-type",
+] }
[tasks.appflowy-sdk-dev-macos]
category = "Build"
dependencies = ["env_check"]
-run_task = { name = ["setup-crate-type","sdk-build", "post-desktop", "restore-crate-type"] }
+run_task = { name = [
+ "setup-crate-type",
+ "sdk-build",
+ "post-desktop",
+ "restore-crate-type",
+] }
[tasks.appflowy-sdk-dev-windows]
category = "Build"
dependencies = ["env_check"]
-run_task = { name = ["setup-crate-type","sdk-build", "post-desktop", "restore-crate-type"] }
+run_task = { name = [
+ "setup-crate-type",
+ "sdk-build",
+ "post-desktop",
+ "restore-crate-type",
+] }
[tasks.appflowy-sdk-dev-linux]
category = "Build"
dependencies = ["env_check"]
-run_task = { name = ["setup-crate-type","sdk-build", "post-desktop", "restore-crate-type"] }
+run_task = { name = [
+ "setup-crate-type",
+ "sdk-build",
+ "post-desktop",
+ "restore-crate-type",
+] }
#
@@ -90,7 +116,12 @@ script_runner = "@duckscript"
description = "Build flowy sdk in release mode"
category = "Build"
dependencies = ["env_check"]
-run_task = { name = ["setup-crate-type","sdk-release-build", "post-desktop", "restore-crate-type"] }
+run_task = { name = [
+ "setup-crate-type",
+ "sdk-release-build",
+ "post-desktop",
+ "restore-crate-type",
+] }
#
[tasks.sdk-release-build]
@@ -167,9 +198,19 @@ script_runner = "@duckscript"
[tasks.build-test-lib]
category = "Build"
dependencies = ["env_check"]
-run_task = { name = ["setup-test-crate-type","build-test-backend", "copy-to-sandbox-folder", "restore-test-crate-type"] }
+run_task = { name = [
+ "setup-test-crate-type",
+ "build-test-backend",
+ "copy-to-sandbox-folder",
+ "restore-test-crate-type",
+] }
[tasks.build-test-backend]
+mac_alias = "build-test-backend-default"
+windows_alias = "build-test-backend-widnows"
+linux_alias = "build-test-backend-default"
+
+[tasks.build-test-backend-default]
private = true
script = [
"""
@@ -182,7 +223,39 @@ script = [
]
script_runner = "@shell"
+[tasks.build-test-backend-widnows]
+private = true
+script = [
+ """
+ cd rust-lib/
+ rustup show
+ echo cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FEATURES}"
+ cargo build --package=dart-ffi --target ${TEST_COMPILE_TARGET} --features "${FEATURES}"
+ cd ../
+ """,
+]
+script_runner = "@shell"
+
[tasks.copy-to-sandbox-folder]
+mac_alias = "copy-to-sandbox-folder-default"
+windows_alias = "copy-to-sandbox-folder-windows"
+linux_alias = "copy-to-sandbox-folder-default"
+
+[tasks.copy-to-sandbox-folder-windows]
+private = true
+script = [
+ """
+ # Copy the flowy_sdk lib to system temp directory for flutter unit test.
+ lib = set ${LIB_NAME}.${TEST_LIB_EXT}
+ dest = set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/.sandbox/${lib}
+ rm ${dest}
+ cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${TEST_COMPILE_TARGET}/${TEST_BUILD_FLAG}/${lib} \
+ ${dest}
+ """,
+]
+script_runner = "@duckscript"
+
+[tasks.copy-to-sandbox-folder-default]
private = true
script = [
"""
diff --git a/frontend/scripts/makefile/tests.toml b/frontend/scripts/makefile/tests.toml
index 0140887293..1cc730c20a 100644
--- a/frontend/scripts/makefile/tests.toml
+++ b/frontend/scripts/makefile/tests.toml
@@ -1,5 +1,23 @@
-[tasks.dart_unit_test]
+[tasks.dart_unit_test.macos]
+description = "Run flutter unit tests"
+script = '''
+cargo make --profile test-macos dart_unit_test_inner
+'''
+
+[tasks.dart_unit_test.linux]
+description = "Run flutter unit tests"
+script = '''
+cargo make --profile test-linux dart_unit_test_inner
+'''
+
+[tasks.dart_unit_test.windows]
+description = "Run flutter unit tests"
+script = '''
+cargo make --profile test-windows dart_unit_test_inner
+'''
+
+[tasks.dart_unit_test_inner]
dependencies = ["build-test-lib"]
description = "Run flutter unit tests"
script = '''