Forráskód Böngészése

chore: upgrade flutter to 3.10.1 (#2619)

* chore: upgrade flutter and dart

* ci: upgrade flutter in cicd

* fix: remove textstyle_extensions from flowy_infra

* ci: upgrade flutter in cicd

* fix: update flutter.toml

* fix: deprecations and ffi

* fix: move json_annotation to dependencies

Must have accidentally moved it to dev_dependencies when upgrading dependencies

* fix: update editor ref and use fold

* chore: try with generate true
Mathias Mogensen 1 éve
szülő
commit
cdfb634aa6
53 módosított fájl, 412 hozzáadás és 472 törlés
  1. 1 1
      .github/workflows/flutter_ci.yaml
  2. 1 1
      .github/workflows/integration_test.yml
  3. 2 6
      .github/workflows/release.yml
  4. 2 2
      .github/workflows/rust_ci.yaml
  5. 1 1
      .github/workflows/rust_coverage.yml
  6. 1 1
      frontend/.vscode/tasks.json
  7. 2 2
      frontend/appflowy_flutter/Makefile
  8. 1 1
      frontend/appflowy_flutter/README.md
  9. 11 7
      frontend/appflowy_flutter/integration_test/util/base.dart
  10. 5 5
      frontend/appflowy_flutter/lib/env/env.dart
  11. 1 1
      frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/select_option_type_option_bloc.dart
  12. 1 1
      frontend/appflowy_flutter/lib/plugins/database_view/application/row/row_cache.dart
  13. 2 2
      frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/toolbar/calendar_toolbar.dart
  14. 2 2
      frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/accessory_menu.dart
  15. 1 1
      frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/cells/card_cell.dart
  16. 4 2
      frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/cells/text_card_cell.dart
  17. 5 7
      frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/cells/url_card_cell.dart
  18. 1 1
      frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/accessory.dart
  19. 1 1
      frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/accessory/cell_accessory.dart
  20. 6 5
      frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart
  21. 1 2
      frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/select_option_cell/text_field.dart
  22. 10 9
      frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart
  23. 18 17
      frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/link_to_page_widget.dart
  24. 8 9
      frontend/appflowy_flutter/lib/plugins/document/presentation/more/font_size_switcher.dart
  25. 2 2
      frontend/appflowy_flutter/lib/user/presentation/sign_in_screen.dart
  26. 2 2
      frontend/appflowy_flutter/lib/user/presentation/skip_log_in_screen.dart
  27. 3 3
      frontend/appflowy_flutter/lib/workspace/application/app/app_service.dart
  28. 1 1
      frontend/appflowy_flutter/lib/workspace/presentation/home/home_stack.dart
  29. 4 9
      frontend/appflowy_flutter/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart
  30. 1 1
      frontend/appflowy_flutter/packages/appflowy_backend/example/pubspec.yaml
  31. 0 1
      frontend/appflowy_flutter/packages/appflowy_backend/lib/dispatch/dispatch.dart
  32. 3 3
      frontend/appflowy_flutter/packages/appflowy_backend/pubspec.yaml
  33. 12 4
      frontend/appflowy_flutter/packages/appflowy_backend/test/appflowy_backend_method_channel_test.dart
  34. 7 2
      frontend/appflowy_flutter/packages/appflowy_backend/test/appflowy_backend_test.dart
  35. 9 9
      frontend/appflowy_flutter/packages/appflowy_popover/example/lib/main.dart
  36. 3 3
      frontend/appflowy_flutter/packages/appflowy_popover/pubspec.yaml
  37. 4 5
      frontend/appflowy_flutter/packages/flowy_infra/pubspec.yaml
  38. 1 1
      frontend/appflowy_flutter/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart
  39. 1 2
      frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text_field.dart
  40. 1 2
      frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text_input.dart
  41. 1 2
      frontend/appflowy_flutter/packages/flowy_infra_ui/lib/widget/rounded_input_field.dart
  42. 8 9
      frontend/appflowy_flutter/packages/flowy_infra_ui/pubspec.yaml
  43. 7 2
      frontend/appflowy_flutter/packages/flowy_infra_ui/test/flowy_infra_ui_test.dart
  44. 176 240
      frontend/appflowy_flutter/pubspec.lock
  45. 44 49
      frontend/appflowy_flutter/pubspec.yaml
  46. 3 2
      frontend/appflowy_flutter/test/util.dart
  47. 1 1
      frontend/scripts/docker-buildfiles/Dockerfile
  48. 2 2
      frontend/scripts/generate_language_files.cmd
  49. 2 2
      frontend/scripts/generate_language_files.sh
  50. 6 6
      frontend/scripts/install_dev_env/install_linux.sh
  51. 6 6
      frontend/scripts/install_dev_env/install_macos.sh
  52. 6 6
      frontend/scripts/install_dev_env/install_windows.sh
  53. 8 8
      frontend/scripts/makefile/flutter.toml

+ 1 - 1
.github/workflows/flutter_ci.yaml

@@ -22,7 +22,7 @@ on:
       - "!frontend/appflowy_tauri/**"
 
 env:
-  FLUTTER_VERSION: "3.7.5"
+  FLUTTER_VERSION: "3.10.1"
   RUST_TOOLCHAIN: "1.65"
 
 jobs:

+ 1 - 1
.github/workflows/integration_test.yml

@@ -35,7 +35,7 @@ jobs:
       - uses: subosito/flutter-action@v2
         with:
           channel: "stable"
-          flutter-version: "3.7.5"
+          flutter-version: "3.10.1"
           cache: true
 
       - name: Cache Cargo

+ 2 - 6
.github/workflows/release.yml

@@ -6,7 +6,7 @@ on:
       - "*"
 
 env:
-  FLUTTER_VERSION: "3.7.5"
+  FLUTTER_VERSION: "3.10.1"
   RUST_TOOLCHAIN: "1.65"
 
 jobs:
@@ -136,11 +136,7 @@ jobs:
       fail-fast: false
       matrix:
         job:
-          - {
-              target: x86_64-apple-darwin,
-              os: macos-11,
-              extra-build-args: "",
-            }
+          - { target: x86_64-apple-darwin, os: macos-11, extra-build-args: "" }
     steps:
       - name: Checkout source code
         uses: actions/checkout@v3

+ 2 - 2
.github/workflows/rust_ci.yaml

@@ -22,7 +22,7 @@ on:
 env:
   CARGO_TERM_COLOR: always
   RUST_TOOLCHAIN: "1.65"
-  FLUTTER_VERSION: "3.7.5"
+  FLUTTER_VERSION: "3.10.1"
 
 jobs:
   test-on-ubuntu:
@@ -80,7 +80,7 @@ jobs:
         working-directory: shared-lib
 
       - name: clippy shared-lib
-        run:  cargo clippy -- -D warnings
+        run: cargo clippy -- -D warnings
         working-directory: shared-lib
 
       - name: Run shared-lib tests

+ 1 - 1
.github/workflows/rust_coverage.yml

@@ -11,7 +11,7 @@ on:
 
 env:
   CARGO_TERM_COLOR: always
-  FLUTTER_VERSION: "3.7.5"
+  FLUTTER_VERSION: "3.10.1"
   RUST_TOOLCHAIN: "1.65"
 
 jobs:

+ 1 - 1
frontend/.vscode/tasks.json

@@ -118,7 +118,7 @@
     {
       "label": "AF: Generate Freezed Files",
       "type": "shell",
-      "command": "flutter pub run build_runner build --delete-conflicting-outputs",
+      "command": "dart run build_runner build -d",
       "options": {
         "cwd": "${workspaceFolder}/appflowy_flutter"
       }

+ 2 - 2
frontend/appflowy_flutter/Makefile

@@ -1,7 +1,7 @@
 .PHONY: freeze_build, free_watch
 
 freeze_build:
-	flutter pub run build_runner build --delete-conflicting-outputs
+	dart run build_runner build -d
 
 watch:
-	flutter pub run build_runner watch
+	dart run build_runner watch

+ 1 - 1
frontend/appflowy_flutter/README.md

@@ -1,6 +1,6 @@
 <h1 align="center" style="margin:0"> AppFlowy_Flutter</h1>
 <div align="center">
-  <img src="https://img.shields.io/badge/Flutter-v3.7.5-blue"/>
+  <img src="https://img.shields.io/badge/Flutter-v3.10.1-blue"/>
   <img src="https://img.shields.io/badge/Rust-v1.65-orange"/>
 </div>
 

+ 11 - 7
frontend/appflowy_flutter/integration_test/util/base.dart

@@ -58,17 +58,21 @@ class TestFolder {
 
 extension AppFlowyTestBase on WidgetTester {
   Future<void> initializeAppFlowy() async {
-    const MethodChannel('hotkey_manager')
-        .setMockMethodCallHandler((MethodCall methodCall) async {
-      if (methodCall.method == 'unregisterAll') {
-        // do nothing
-      }
-    });
+    TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
+        .setMockMethodCallHandler(
+      const MethodChannel('hotkey_manager'),
+      (MethodCall methodCall) async {
+        if (methodCall.method == 'unregisterAll') {
+          // do nothing
+        }
+
+        return;
+      },
+    );
 
     await app.main();
     await wait(3000);
     await pumpAndSettle(const Duration(seconds: 2));
-    return;
   }
 
   Future<void> tapButton(

+ 5 - 5
frontend/appflowy_flutter/lib/env/env.dart

@@ -10,32 +10,32 @@ abstract class Env {
     varName: 'SUPABASE_URL',
     defaultValue: '',
   )
-  static final supabaseUrl = _Env.supabaseUrl;
+  static final String supabaseUrl = _Env.supabaseUrl;
   @EnviedField(
     obfuscate: true,
     varName: 'SUPABASE_ANON_KEY',
     defaultValue: '',
   )
-  static final supabaseAnonKey = _Env.supabaseAnonKey;
+  static final String supabaseAnonKey = _Env.supabaseAnonKey;
   @EnviedField(
     obfuscate: true,
     varName: 'SUPABASE_KEY',
     defaultValue: '',
   )
-  static final supabaseKey = _Env.supabaseKey;
+  static final String supabaseKey = _Env.supabaseKey;
   @EnviedField(
     obfuscate: true,
     varName: 'SUPABASE_JWT_SECRET',
     defaultValue: '',
   )
-  static final supabaseJwtSecret = _Env.supabaseJwtSecret;
+  static final String supabaseJwtSecret = _Env.supabaseJwtSecret;
 
   @EnviedField(
     obfuscate: true,
     varName: 'SUPABASE_COLLAB_TABLE',
     defaultValue: '',
   )
-  static final supabaseCollabTable = _Env.supabaseCollabTable;
+  static final String supabaseCollabTable = _Env.supabaseCollabTable;
 }
 
 bool get isSupabaseEnable =>

+ 1 - 1
frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/select_option_type_option_bloc.dart

@@ -5,7 +5,7 @@ import 'dart:async';
 import 'package:dartz/dartz.dart';
 part 'select_option_type_option_bloc.freezed.dart';
 
-abstract class ISelectOptionAction {
+abstract mixin class ISelectOptionAction {
   Future<List<SelectOptionPB>> Function(String) get insertOption;
 
   List<SelectOptionPB> Function(SelectOptionPB) get deleteOption;

+ 1 - 1
frontend/appflowy_flutter/lib/plugins/database_view/application/row/row_cache.dart

@@ -17,7 +17,7 @@ abstract class RowFieldsDelegate {
   void onFieldsChanged(void Function(List<FieldInfo>) callback);
 }
 
-abstract class RowCacheDelegate {
+abstract mixin class RowCacheDelegate {
   UnmodifiableListView<FieldInfo> get fields;
   void onRowDispose();
 }

+ 2 - 2
frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/toolbar/calendar_toolbar.dart

@@ -17,11 +17,11 @@ class CalendarToolbar extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return SizedBox(
+    return const SizedBox(
       height: 40,
       child: Row(
         mainAxisAlignment: MainAxisAlignment.end,
-        children: const [
+        children: [
           _UnscheduleEventsButton(),
           _SettingButton(),
         ],

+ 2 - 2
frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/accessory_menu.dart

@@ -62,9 +62,9 @@ class _AccessoryMenu extends StatelessWidget {
                 color: AFThemeExtension.of(context).toggleOffFill,
               ),
               const VSpace(6),
-              IntrinsicHeight(
+              const IntrinsicHeight(
                 child: Row(
-                  children: const [
+                  children: [
                     SortMenu(),
                     HSpace(6),
                     FilterMenu(),

+ 1 - 1
frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/cells/card_cell.dart

@@ -157,7 +157,7 @@ class EditableRowNotifier {
   }
 }
 
-abstract class EditableCell {
+abstract mixin class EditableCell {
   // Each cell notifier will be bind to the [EditableRowNotifier], which enable
   // the row notifier receive its cells event. For example: begin editing the
   // cell or end editing the cell.

+ 4 - 2
frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/cells/text_card_cell.dart

@@ -2,7 +2,6 @@ import 'package:appflowy/plugins/database_view/application/cell/cell_controller_
 import 'package:flowy_infra_ui/style_widget/text.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:textstyle_extensions/textstyle_extensions.dart';
 import '../../row/cell_builder.dart';
 import '../bloc/text_card_cell_bloc.dart';
 import '../define.dart';
@@ -178,7 +177,10 @@ class _TextCardCellState extends State<TextCardCell> {
         onChanged: (value) => focusChanged(),
         onEditingComplete: () => focusNode.unfocus(),
         maxLines: null,
-        style: Theme.of(context).textTheme.bodyMedium!.size(_fontSize()),
+        style: Theme.of(context)
+            .textTheme
+            .bodyMedium!
+            .copyWith(fontSize: _fontSize()),
         decoration: InputDecoration(
           // Magic number 4 makes the textField take up the same space as FlowyText
           contentPadding: EdgeInsets.symmetric(

+ 5 - 7
frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/cells/url_card_cell.dart

@@ -2,7 +2,6 @@ import 'package:appflowy/plugins/database_view/application/cell/cell_controller_
 import 'package:flowy_infra/size.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:textstyle_extensions/textstyle_extensions.dart';
 
 import '../bloc/url_card_cell_bloc.dart';
 import '../define.dart';
@@ -60,12 +59,11 @@ class _URLCardCellState extends State<URLCardCell> {
                   textAlign: TextAlign.left,
                   text: TextSpan(
                     text: state.content,
-                    style: Theme.of(context)
-                        .textTheme
-                        .bodyMedium!
-                        .size(widget.style?.fontSize ?? FontSizes.s14)
-                        .textColor(Theme.of(context).colorScheme.primary)
-                        .underline,
+                    style: Theme.of(context).textTheme.bodyMedium!.copyWith(
+                          fontSize: widget.style?.fontSize ?? FontSizes.s14,
+                          color: Theme.of(context).colorScheme.primary,
+                          decoration: TextDecoration.underline,
+                        ),
                   ),
                 ),
               ),

+ 1 - 1
frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/accessory.dart

@@ -6,7 +6,7 @@ enum AccessoryType {
   more,
 }
 
-abstract class CardAccessory implements Widget {
+abstract mixin class CardAccessory implements Widget {
   AccessoryType get type;
   void onTap(BuildContext context) {}
 }

+ 1 - 1
frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/accessory/cell_accessory.dart

@@ -41,7 +41,7 @@ class GridCellAccessoryBuilder {
   }
 }
 
-abstract class GridCellAccessoryState {
+abstract mixin class GridCellAccessoryState {
   void onTap();
 
   // The accessory will be hidden if enable() return false;

+ 6 - 5
frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart

@@ -17,7 +17,6 @@ import 'package:appflowy_backend/protobuf/flowy-error/errors.pbserver.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_bloc/flutter_bloc.dart';
 import 'package:table_calendar/table_calendar.dart';
-import 'package:textstyle_extensions/textstyle_extensions.dart';
 import '../../../../grid/presentation/layout/sizes.dart';
 import '../../../../grid/presentation/widgets/common/type_option_separator.dart';
 import '../../../../grid/presentation/widgets/header/type_option/date.dart';
@@ -198,11 +197,13 @@ class _CellCalendarWidgetState extends State<_CellCalendarWidget> {
             outsideDecoration: boxDecoration,
             defaultTextStyle: textStyle,
             weekendTextStyle: textStyle,
-            selectedTextStyle:
-                textStyle.textColor(Theme.of(context).colorScheme.surface),
+            selectedTextStyle: textStyle.copyWith(
+              color: Theme.of(context).colorScheme.surface,
+            ),
             todayTextStyle: textStyle,
-            outsideTextStyle:
-                textStyle.textColor(Theme.of(context).disabledColor),
+            outsideTextStyle: textStyle.copyWith(
+              color: Theme.of(context).disabledColor,
+            ),
           ),
           selectedDayPredicate: (day) => isSameDay(state.dateTime, day),
           onDaySelected: (selectedDay, focusedDay) {

+ 1 - 2
frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/select_option_cell/text_field.dart

@@ -8,7 +8,6 @@ import 'package:easy_localization/easy_localization.dart';
 import 'package:appflowy/generated/locale_keys.g.dart';
 import 'package:flutter/services.dart';
 import 'package:textfield_tags/textfield_tags.dart';
-import 'package:textstyle_extensions/textstyle_extensions.dart';
 
 import 'extension.dart';
 
@@ -126,7 +125,7 @@ class _SelectOptionTextFieldState extends State<SelectOptionTextField> {
               hintStyle: Theme.of(context)
                   .textTheme
                   .bodySmall!
-                  .textColor(Theme.of(context).hintColor),
+                  .copyWith(color: Theme.of(context).hintColor),
               suffixText: _suffixText(),
               counterText: "",
               prefixIconConstraints:

+ 10 - 9
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart

@@ -6,7 +6,6 @@ import 'package:appflowy/plugins/document/presentation/editor_style.dart';
 import 'package:appflowy_editor/appflowy_editor.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:tuple/tuple.dart';
 
 /// Wrapper for the appflowy editor.
 class AppFlowyEditorPage extends StatefulWidget {
@@ -88,14 +87,16 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
 
   @override
   Widget build(BuildContext context) {
-    final autoFocusParameters = _computeAutoFocusParameters();
+    final (bool autoFocus, Selection? selection) =
+        _computeAutoFocusParameters();
+
     final editor = AppFlowyEditor.custom(
       editorState: widget.editorState,
       editable: true,
       scrollController: scrollController,
       // setup the auto focus parameters
-      autoFocus: autoFocusParameters.item1,
-      focusedSelection: autoFocusParameters.item2,
+      autoFocus: autoFocus,
+      focusedSelection: selection,
       // setup the theme
       editorStyle: styleCustomizer.style(),
       // customize the block builder
@@ -107,7 +108,7 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
     );
 
     return Center(
-      child: Container(
+      child: ConstrainedBox(
         constraints: const BoxConstraints(
           maxWidth: double.infinity,
         ),
@@ -246,17 +247,17 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
     return builders;
   }
 
-  Tuple2<bool, Selection?> _computeAutoFocusParameters() {
+  (bool, Selection?) _computeAutoFocusParameters() {
     if (widget.editorState.document.isEmpty) {
-      return Tuple2(true, Selection.collapse([0], 0));
+      return (true, Selection.collapse([0], 0));
     }
     final nodes = widget.editorState.document.root.children
         .where((element) => element.delta != null);
     final isAllEmpty =
         nodes.isNotEmpty && nodes.every((element) => element.delta!.isEmpty);
     if (isAllEmpty) {
-      return Tuple2(true, Selection.collapse(nodes.first.path, 0));
+      return (true, Selection.collapse(nodes.first.path, 0));
     }
-    return const Tuple2(false, null);
+    return const (false, null);
   }
 }

+ 18 - 17
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/link_to_page_widget.dart

@@ -2,7 +2,6 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/base/inser
 import 'package:appflowy/workspace/application/app/app_service.dart';
 import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
 import 'package:appflowy_editor/appflowy_editor.dart';
-import 'package:dartz/dartz.dart' as dartz;
 import 'package:flowy_infra/image.dart';
 import 'package:flowy_infra_ui/style_widget/button.dart';
 import 'package:flowy_infra_ui/style_widget/text.dart';
@@ -66,16 +65,16 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
   EditorStyle get style => widget.editorState.editorStyle;
   int _selectedIndex = 0;
   int _totalItems = 0;
-  Future<List<dartz.Tuple2<ViewPB, List<ViewPB>>>>? _availableLayout;
-  final Map<int, dartz.Tuple2<ViewPB, ViewPB>> _items = {};
+  Future<List<(ViewPB, List<ViewPB>)>>? _availableLayout;
+  final Map<int, (ViewPB, ViewPB)> _items = {};
 
-  Future<List<dartz.Tuple2<ViewPB, List<ViewPB>>>> fetchItems() async {
+  Future<List<(ViewPB, List<ViewPB>)>> fetchItems() async {
     final items = await AppBackendService().fetchViews(widget.layoutType);
 
     int index = 0;
-    for (final app in items) {
-      for (final view in app.value2) {
-        _items.putIfAbsent(index, () => dartz.Tuple2(app.value1, view));
+    for (final (app, children) in items) {
+      for (final view in children) {
+        _items.putIfAbsent(index, () => (app, view));
         index += 1;
       }
     }
@@ -158,8 +157,8 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
       newSelectedIndex %= _totalItems;
     } else if (event.logicalKey == LogicalKeyboardKey.enter) {
       widget.onSelected(
-        _items[_selectedIndex]!.value1,
-        _items[_selectedIndex]!.value2,
+        _items[_selectedIndex]!.$1,
+        _items[_selectedIndex]!.$2,
       );
     }
 
@@ -173,15 +172,15 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
   Widget _buildListWidget(
     BuildContext context,
     int selectedIndex,
-    Future<List<dartz.Tuple2<ViewPB, List<ViewPB>>>>? items,
+    Future<List<(ViewPB, List<ViewPB>)>>? items,
   ) {
     int index = 0;
-    return FutureBuilder<List<dartz.Tuple2<ViewPB, List<ViewPB>>>>(
+    return FutureBuilder<List<(ViewPB, List<ViewPB>)>>(
       builder: (context, snapshot) {
         if (snapshot.hasData &&
             snapshot.connectionState == ConnectionState.done) {
           final views = snapshot.data;
-          final children = <Widget>[
+          final List<Widget> children = [
             Padding(
               padding: const EdgeInsets.symmetric(vertical: 4),
               child: FlowyText.regular(
@@ -191,18 +190,20 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
               ),
             ),
           ];
+
           if (views != null && views.isNotEmpty) {
-            for (final view in views) {
-              if (view.value2.isNotEmpty) {
+            for (final (view, viewChildren) in views) {
+              if (viewChildren.isNotEmpty) {
                 children.add(
                   Padding(
                     padding: const EdgeInsets.symmetric(vertical: 4),
                     child: FlowyText.regular(
-                      view.value1.name,
+                      view.name,
                     ),
                   ),
                 );
-                for (final value in view.value2) {
+
+                for (final value in viewChildren) {
                   children.add(
                     FlowyButton(
                       isSelected: index == _selectedIndex,
@@ -211,7 +212,7 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
                         color: Theme.of(context).iconTheme.color,
                       ),
                       text: FlowyText.regular(value.name),
-                      onTap: () => widget.onSelected(view.value1, value),
+                      onTap: () => widget.onSelected(view, value),
                     ),
                   );
 

+ 8 - 9
frontend/appflowy_flutter/lib/plugins/document/presentation/more/font_size_switcher.dart

@@ -4,7 +4,6 @@ import 'package:flowy_infra_ui/style_widget/text.dart';
 import 'package:flutter/material.dart';
 import 'package:appflowy/generated/locale_keys.g.dart';
 import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:tuple/tuple.dart';
 import 'package:easy_localization/easy_localization.dart';
 
 class FontSizeSwitcher extends StatefulWidget {
@@ -17,10 +16,10 @@ class FontSizeSwitcher extends StatefulWidget {
 }
 
 class _FontSizeSwitcherState extends State<FontSizeSwitcher> {
-  final List<Tuple3<String, double, bool>> _fontSizes = [
-    Tuple3(LocaleKeys.moreAction_small.tr(), 14.0, false),
-    Tuple3(LocaleKeys.moreAction_medium.tr(), 18.0, true),
-    Tuple3(LocaleKeys.moreAction_large.tr(), 22.0, false),
+  final List<(String, double, bool)> _fontSizes = [
+    (LocaleKeys.moreAction_small.tr(), 14.0, false),
+    (LocaleKeys.moreAction_medium.tr(), 18.0, true),
+    (LocaleKeys.moreAction_large.tr(), 22.0, false),
   ];
 
   @override
@@ -42,9 +41,9 @@ class _FontSizeSwitcherState extends State<FontSizeSwitcher> {
             ),
             ToggleButtons(
               isSelected:
-                  _fontSizes.map((e) => e.item2 == state.fontSize).toList(),
+                  _fontSizes.map((e) => e.$2 == state.fontSize).toList(),
               onPressed: (int index) {
-                _updateSelectedFontSize(_fontSizes[index].item2);
+                _updateSelectedFontSize(_fontSizes[index].$2);
               },
               color: foregroundColor,
               borderRadius: const BorderRadius.all(Radius.circular(5)),
@@ -63,8 +62,8 @@ class _FontSizeSwitcherState extends State<FontSizeSwitcher> {
               children: _fontSizes
                   .map(
                     (e) => Text(
-                      e.item1,
-                      style: TextStyle(fontSize: e.item2),
+                      e.$1,
+                      style: TextStyle(fontSize: e.$2),
                     ),
                   )
                   .toList(),

+ 2 - 2
frontend/appflowy_flutter/lib/user/presentation/sign_in_screen.dart

@@ -273,9 +273,9 @@ class OrContinueWith extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return Row(
+    return const Row(
       mainAxisAlignment: MainAxisAlignment.spaceEvenly,
-      children: const [
+      children: [
         Flexible(
           child: Divider(
             color: Colors.white,

+ 2 - 2
frontend/appflowy_flutter/lib/user/presentation/skip_log_in_screen.dart

@@ -178,8 +178,8 @@ class _SkipLoginMoveWindow extends StatelessWidget
 
   @override
   Widget build(BuildContext context) {
-    return Row(
-      children: const [
+    return const Row(
+      children: [
         Expanded(
           child: MoveWindowDetector(),
         ),

+ 3 - 3
frontend/appflowy_flutter/lib/workspace/application/app/app_service.dart

@@ -85,10 +85,10 @@ class AppBackendService {
     return FolderEventMoveItem(payload).send();
   }
 
-  Future<List<Tuple2<ViewPB, List<ViewPB>>>> fetchViews(
+  Future<List<(ViewPB, List<ViewPB>)>> fetchViews(
     ViewLayoutPB layoutType,
   ) async {
-    final result = <Tuple2<ViewPB, List<ViewPB>>>[];
+    final result = <(ViewPB, List<ViewPB>)>[];
     return FolderEventReadCurrentWorkspace().send().then((value) async {
       final workspaces = value.getLeftOrNull<WorkspaceSettingPB>();
       if (workspaces != null) {
@@ -101,7 +101,7 @@ class AppBackendService {
                 .toList(),
           );
           if (childViews != null && childViews.isNotEmpty) {
-            result.add(Tuple2(view, childViews));
+            result.add((view, childViews));
           }
         }
       }

+ 1 - 1
frontend/appflowy_flutter/lib/workspace/presentation/home/home_stack.dart

@@ -100,7 +100,7 @@ class FadingIndexedStackState extends State<FadingIndexedStack> {
   }
 }
 
-abstract class NavigationItem {
+abstract mixin class NavigationItem {
   Widget get leftBarItem;
   Widget? get rightBarItem => null;
 

+ 4 - 9
frontend/appflowy_flutter/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart

@@ -108,15 +108,10 @@ class _DebugToast {
 
   Future<String> _getDeviceInfo() async {
     final deviceInfoPlugin = DeviceInfoPlugin();
-    final deviceInfo = deviceInfoPlugin.deviceInfo;
-
-    return deviceInfo.then((info) {
-      var debugText = "";
-      info.toMap().forEach((key, value) {
-        debugText = "$debugText$key: $value\n";
-      });
-      return debugText;
-    });
+    final deviceInfo = await deviceInfoPlugin.deviceInfo;
+
+    return deviceInfo.data.entries
+        .fold('', (prev, el) => "$prev${el.key}: ${el.value}");
   }
 
   Future<String> _getDocumentPath() async {

+ 1 - 1
frontend/appflowy_flutter/packages/appflowy_backend/example/pubspec.yaml

@@ -6,7 +6,7 @@ description: Demonstrates how to use the appflowy_backend plugin.
 publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 
 environment:
-  sdk: ">=2.7.0 <3.0.0"
+  sdk: ">=2.12.0 <3.0.0"
 
 dependencies:
   flutter:

+ 0 - 1
frontend/appflowy_flutter/packages/appflowy_backend/lib/dispatch/dispatch.dart

@@ -8,7 +8,6 @@ import 'package:appflowy_backend/protobuf/flowy-net/network_state.pb.dart';
 import 'package:isolates/isolates.dart';
 import 'package:isolates/ports.dart';
 import 'package:ffi/ffi.dart';
-// ignore: unused_import
 import 'package:flutter/services.dart';
 import 'dart:async';
 import 'dart:typed_data';

+ 3 - 3
frontend/appflowy_flutter/packages/appflowy_backend/pubspec.yaml

@@ -1,17 +1,17 @@
 name: appflowy_backend
 description: A new flutter plugin project.
 version: 0.0.1
-homepage:
+homepage: https://appflowy.io
 publish_to: "none"
 
 environment:
-  sdk: ">=2.12.0-0 <3.0.0"
+  sdk: ">=2.17.0-0 <3.0.0"
   flutter: ">=1.17.0"
 
 dependencies:
   flutter:
     sdk: flutter
-  ffi: ^2.0.1
+  ffi: ^2.0.2
   isolates: ^3.0.3+8
   protobuf: ^2.0.0
   dartz: ^0.10.1

+ 12 - 4
frontend/appflowy_flutter/packages/appflowy_backend/test/appflowy_backend_method_channel_test.dart

@@ -9,13 +9,21 @@ void main() {
   TestWidgetsFlutterBinding.ensureInitialized();
 
   setUp(() {
-    channel.setMockMethodCallHandler((MethodCall methodCall) async {
-      return '42';
-    });
+    TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
+        .setMockMethodCallHandler(
+      channel,
+      (MethodCall methodCall) async {
+        return '42';
+      },
+    );
   });
 
   tearDown(() {
-    channel.setMockMethodCallHandler(null);
+    TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
+        .setMockMethodCallHandler(
+      channel,
+      null,
+    );
   });
 
   test('getPlatformVersion', () async {

+ 7 - 2
frontend/appflowy_flutter/packages/appflowy_backend/test/appflowy_backend_test.dart

@@ -8,13 +8,18 @@ void main() {
   TestWidgetsFlutterBinding.ensureInitialized();
 
   setUp(() {
-    channel.setMockMethodCallHandler((MethodCall methodCall) async {
+    TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
+        .setMockMethodCallHandler(channel, (MethodCall methodCall) async {
       return '42';
     });
   });
 
   tearDown(() {
-    channel.setMockMethodCallHandler(null);
+    TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
+        .setMockMethodCallHandler(
+      channel,
+      null,
+    );
   });
 
   test('getPlatformVersion', () async {

+ 9 - 9
frontend/appflowy_flutter/packages/appflowy_popover/example/lib/main.dart

@@ -78,11 +78,11 @@ class _MyHomePageState extends State<MyHomePage> {
             direction: PopoverDirection.topWithLeftAligned,
           ),
         ]),
-        Expanded(
+        const Expanded(
           child: Column(
             mainAxisAlignment: MainAxisAlignment.center,
-            children: <Widget>[
-              const ExampleButton(
+            children: [
+              ExampleButton(
                 label: "Top",
                 offset: Offset(0, 10),
                 direction: PopoverDirection.bottomWithCenterAligned,
@@ -91,7 +91,7 @@ class _MyHomePageState extends State<MyHomePage> {
                 child: Column(
                   mainAxisAlignment: MainAxisAlignment.center,
                   crossAxisAlignment: CrossAxisAlignment.center,
-                  children: const [
+                  children: [
                     ExampleButton(
                       label: "Central",
                       offset: Offset(0, 10),
@@ -100,7 +100,7 @@ class _MyHomePageState extends State<MyHomePage> {
                   ],
                 ),
               ),
-              const ExampleButton(
+              ExampleButton(
                 label: "Bottom",
                 offset: Offset(0, -10),
                 direction: PopoverDirection.topWithCenterAligned,
@@ -108,15 +108,15 @@ class _MyHomePageState extends State<MyHomePage> {
             ],
           ),
         ),
-        Column(
+        const Column(
           children: [
-            const ExampleButton(
+            ExampleButton(
               label: "Right top",
               offset: Offset(0, 10),
               direction: PopoverDirection.bottomWithRightAligned,
             ),
-            Expanded(child: Container()),
-            const ExampleButton(
+            Expanded(child: SizedBox.shrink()),
+            ExampleButton(
               label: "Right bottom",
               offset: Offset(0, -10),
               direction: PopoverDirection.topWithRightAligned,

+ 3 - 3
frontend/appflowy_flutter/packages/appflowy_popover/pubspec.yaml

@@ -1,11 +1,11 @@
 name: appflowy_popover
 description: A new Flutter package project.
 version: 0.0.1
-homepage:
+homepage: https://appflowy.io
 
 environment:
-  sdk: ">=2.19.0 <3.0.0"
-  flutter: ">=3.7.0"
+  sdk: ">=3.0.0 <4.0.0"
+  flutter: ">=3.10.1"
 
 dependencies:
   flutter:

+ 4 - 5
frontend/appflowy_flutter/packages/flowy_infra/pubspec.yaml

@@ -1,19 +1,18 @@
 name: flowy_infra
 description: A new Flutter package project.
 version: 0.0.1
-homepage:
+homepage: https://appflowy.io
 
 environment:
-  sdk: ">=2.18.0 <3.0.0"
-  flutter: ">=3.3.0"
+  sdk: ">=3.0.0 <4.0.0"
+  flutter: ">=3.10.1"
 
 dependencies:
   flutter:
     sdk: flutter
   time: '>=2.0.0'
   uuid: ">=2.2.2"
-  textstyle_extensions: '2.0.0-nullsafety'
-  flutter_svg: ^2.0.2
+  flutter_svg: ^2.0.6
 
 dev_dependencies:
   flutter_test:

+ 1 - 1
frontend/appflowy_flutter/packages/flowy_infra_ui/lib/src/flowy_overlay/flowy_overlay.dart

@@ -73,7 +73,7 @@ TransitionBuilder overlayManagerBuilder() {
   };
 }
 
-abstract class FlowyOverlayDelegate {
+abstract mixin class FlowyOverlayDelegate {
   bool asBarrier() => false;
   void didRemove() => {};
 }

+ 1 - 2
frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text_field.dart

@@ -3,7 +3,6 @@ import 'dart:async';
 import 'package:flowy_infra/size.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
-import 'package:textstyle_extensions/textstyle_extensions.dart';
 
 class FlowyTextField extends StatefulWidget {
   final String hintText;
@@ -125,7 +124,7 @@ class FlowyTextFieldState extends State<FlowyTextField> {
         hintStyle: Theme.of(context)
             .textTheme
             .bodySmall!
-            .textColor(Theme.of(context).hintColor),
+            .copyWith(color: Theme.of(context).hintColor),
         suffixText: _suffixText(),
         counterText: "",
         focusedBorder: OutlineInputBorder(

+ 1 - 2
frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text_input.dart

@@ -3,7 +3,6 @@ import 'dart:math' as math;
 import 'package:flowy_infra/size.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
-import 'package:textstyle_extensions/textstyle_extensions.dart';
 
 class FlowyFormTextInput extends StatelessWidget {
   static EdgeInsets kDefaultTextInputPadding =
@@ -221,7 +220,7 @@ class StyledSearchTextInputState extends State<StyledSearchTextInput> {
               hintStyle: Theme.of(context)
                   .textTheme
                   .bodyMedium!
-                  .textColor(Theme.of(context).hintColor),
+                  .copyWith(color: Theme.of(context).hintColor),
               labelText: widget.label,
             ),
       ),

+ 1 - 2
frontend/appflowy_flutter/packages/flowy_infra_ui/lib/widget/rounded_input_field.dart

@@ -3,7 +3,6 @@ import 'package:flowy_infra_ui/widget/rounded_button.dart';
 import 'package:flutter/material.dart';
 import 'package:flowy_infra/time/duration.dart';
 import 'package:flutter/services.dart';
-import 'package:textstyle_extensions/textstyle_extensions.dart';
 
 class RoundedInputField extends StatefulWidget {
   final String? hintText;
@@ -131,7 +130,7 @@ class _RoundedInputFieldState extends State<RoundedInputField> {
             hintStyle: Theme.of(context)
                 .textTheme
                 .bodySmall!
-                .textColor(Theme.of(context).hintColor),
+                .copyWith(color: Theme.of(context).hintColor),
             suffixText: _suffixText(),
             counterText: "",
             enabledBorder: OutlineInputBorder(

+ 8 - 9
frontend/appflowy_flutter/packages/flowy_infra_ui/pubspec.yaml

@@ -1,25 +1,24 @@
 name: flowy_infra_ui
 description: A new flutter plugin project.
 version: 0.0.1
-homepage:
+homepage: https://appflowy.io
 publish_to: "none"
 
 environment:
-  sdk: ">=2.19.0 <3.0.0"
-  flutter: ">=3.7.0"
+  sdk: ">=3.0.0 <4.0.0"
+  flutter: ">=3.10.1"
 
 dependencies:
   flutter:
     sdk: flutter
 
   # Thirdparty packages
-  textstyle_extensions: "2.0.0-nullsafety"
   dartz:
-  provider: ^6.0.1
-  styled_widget: "^0.3.1"
-  equatable: "^2.0.3"
-  animations: ^2.0.0
-  loading_indicator: ^3.0.1
+  provider: ^6.0.5
+  styled_widget: ^0.4.1
+  equatable: ^2.0.5
+  animations: ^2.0.7
+  loading_indicator: ^3.1.0
   async:
 
   # Federated Platform Interface

+ 7 - 2
frontend/appflowy_flutter/packages/flowy_infra_ui/test/flowy_infra_ui_test.dart

@@ -7,13 +7,18 @@ void main() {
   TestWidgetsFlutterBinding.ensureInitialized();
 
   setUp(() {
-    channel.setMockMethodCallHandler((MethodCall methodCall) async {
+    TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
+        .setMockMethodCallHandler(channel, (MethodCall methodCall) async {
       return '42';
     });
   });
 
   tearDown(() {
-    channel.setMockMethodCallHandler(null);
+    TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
+        .setMockMethodCallHandler(
+      channel,
+      null,
+    );
   });
 
   test('getPlatformVersion', () async {});

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 176 - 240
frontend/appflowy_flutter/pubspec.lock


+ 44 - 49
frontend/appflowy_flutter/pubspec.yaml

@@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
 version: 0.1.5
 
 environment:
-  sdk: ">=2.19.0 <3.0.0"
+  sdk: ">=3.0.0 <4.0.0"
 
 # Dependencies specify other packages that your package needs in order to work.
 # To automatically upgrade your package dependencies to the latest versions
@@ -42,72 +42,64 @@ dependencies:
     git:
       url: https://github.com/AppFlowy-IO/appflowy-board.git
       ref: a183c57
-  # appflowy_editor: ^0.1.9
   appflowy_editor:
-    # path: /Users/lucas.xu/Desktop/appflowy-editor
     git:
-      url: https://github.com/LucasXu0/appflowy-editor.git
-      ref: 09e91c
+      url: https://github.com/AppFlowy-IO/appflowy-editor.git
+      ref: 30ce149
   appflowy_popover:
     path: packages/appflowy_popover
 
   #  third party packages
-  intl: ^0.17.0
-  time: "^2.0.0"
-  equatable: "^2.0.3"
-  freezed_annotation: ^2.1.0
-  get_it: "^7.1.3"
-  flutter_bloc: "^8.0.1"
+  intl: ^0.18.0
+  time: ^2.1.3
+  equatable: ^2.0.5
+  freezed_annotation: ^2.2.0
+  get_it: ^7.6.0
+  flutter_bloc: ^8.1.3
   flutter_math_fork:
     git:
-      url: https://github.com/LucasXu0/flutter_math_fork.git
-      ref: master
+      url: https://github.com/xazin/flutter_math_fork.git
+      ref: de24059
   dartz: ^0.10.1
-  provider: ^6.0.1
-  path_provider: ^2.0.1
-  sized_context: ^1.0.0+1
-  styled_widget: "^0.3.1"
+  provider: ^6.0.5
+  path_provider: ^2.0.15
+  sized_context: ^1.0.0+4
+  styled_widget: ^0.4.1
   expandable: ^5.0.1
   flutter_colorpicker: ^1.0.3
   highlight: ^0.7.0
-  package_info_plus: ^1.3.0
-  url_launcher: ^6.0.2
-  # file_picker: ^4.2.1
+  package_info_plus: ^4.0.1
+  url_launcher: ^6.1.11
   clipboard: ^0.1.3
-  connectivity_plus: ^3.0.3
+  connectivity_plus: ^4.0.1
   connectivity_plus_platform_interface: ^1.2.2
-  easy_localization: ^3.0.0
+  easy_localization: ^3.0.2
   textfield_tags: ^2.0.2
-  # The following adds the Cupertino Icons font to your application.
-  # Use with the CupertinoIcons class for iOS style icons.
-  cupertino_icons: ^1.0.2
-  device_info_plus: ^4.0.0
-  fluttertoast: ^8.0.9
-  table_calendar: ^3.0.5
+  device_info_plus: ^9.0.1
+  fluttertoast: ^8.2.2
+  json_annotation: ^4.8.1
+  table_calendar: ^3.0.9
   reorderables: ^0.6.0
   linked_scroll_controller: ^0.2.0
   hotkey_manager: ^0.1.7
-  fixnum: ^1.0.1
-  tuple: ^2.0.0
+  fixnum: ^1.1.0
   protobuf: "2.0.0"
   charcode: ^1.3.1
-  collection: ^1.16.0
-  bloc: ^8.1.0
-  textstyle_extensions: "2.0.0-nullsafety"
-  shared_preferences: ^2.0.15
-  google_fonts: ^4.0.3
-  file_picker: <=5.0.0
-  percent_indicator: ^4.0.1
-  calendar_view: ^1.0.1
-  window_manager: ^0.3.0
-  http: ^0.13.5
-  json_annotation: ^4.7.0
-  path: ^1.8.2
+  collection: ^1.17.1
+  bloc: ^8.1.2
+  shared_preferences: ^2.1.1
+  google_fonts: ^4.0.5
+  file_picker: ^5.3.1
+  percent_indicator: ^4.2.3
+  calendar_view: ^1.0.3
+  window_manager: ^0.3.4
+  http: ^1.0.0
+  path: ^1.8.3
   mocktail: ^0.3.0
-  archive: ^3.3.0
-  flutter_svg: ^2.0.5
+  archive: ^3.3.7
+  flutter_svg: ^2.0.6
   nanoid: ^1.0.0
-  supabase_flutter: ^1.9.1
+  supabase_flutter: ^1.10.0
   envied: ^0.3.0+3
 
 dev_dependencies:
@@ -117,12 +109,15 @@ dev_dependencies:
     sdk: flutter
   integration_test:
     sdk: flutter
-  build_runner: ^2.3.3
-  freezed: ^2.1.0+1
-  bloc_test: ^9.0.2
-  json_serializable: ^6.5.4
+  build_runner: ^2.4.4
+  freezed: ^2.3.4
+  bloc_test: ^9.1.2
+  json_serializable: ^6.7.0
   envied_generator: ^0.3.0+3
 
+dependency_overrides:
+  http: ^1.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

+ 3 - 2
frontend/appflowy_flutter/test/util.dart

@@ -102,8 +102,9 @@ class AppFlowyUnitTest {
 void _pathProviderInitialized() {
   const MethodChannel channel =
       MethodChannel('plugins.flutter.io/path_provider');
-  channel.setMockMethodCallHandler((MethodCall methodCall) async {
-    return ".";
+  TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
+      .setMockMethodCallHandler(channel, (MethodCall methodCall) async {
+    return '.';
   });
 }
 

+ 1 - 1
frontend/scripts/docker-buildfiles/Dockerfile

@@ -38,7 +38,7 @@ RUN source ~/.cargo/env && \
 RUN sudo pacman -S --noconfirm git tar gtk3
 RUN curl -sSfL \
       --output flutter.tar.xz \
-      https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.5-stable.tar.xz && \
+      https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.10.1-stable.tar.xz && \
     tar -xf flutter.tar.xz && \
     rm flutter.tar.xz
 RUN flutter config --enable-linux-desktop

+ 2 - 2
frontend/scripts/generate_language_files.cmd

@@ -1,5 +1,5 @@
 echo 'Generating language files'
 cd appflowy_flutter
 
-call flutter pub run easy_localization:generate -S assets/translations/
-call flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json
+call dart run easy_localization:generate -S assets/translations/
+call dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json

+ 2 - 2
frontend/scripts/generate_language_files.sh

@@ -2,5 +2,5 @@
 #!/usr/bin/env fish
 echo 'Generating language files'
 cd appflowy_flutter
-flutter pub run easy_localization:generate -S assets/translations/
-flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
+dart run easy_localization:generate -S assets/translations/
+dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json

+ 6 - 6
frontend/scripts/install_dev_env/install_linux.sh

@@ -38,9 +38,9 @@ fi
 printMessage "Setting up Flutter"
 # Get the current Flutter version
 FLUTTER_VERSION=$(flutter --version | grep -oP 'Flutter \K\S+')
-# Check if the current version is 3.7.5
-if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
-    echo "Flutter version is already 3.7.5"
+# Check if the current version is 3.10.1
+if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
+    echo "Flutter version is already 3.10.1"
 else
     # Get the path to the Flutter SDK
     FLUTTER_PATH=$(which flutter)
@@ -49,12 +49,12 @@ else
     current_dir=$(pwd)
 
     cd $FLUTTER_PATH
-    # Use git to checkout version 3.7.5 of Flutter
-    git checkout 3.7.5
+    # Use git to checkout version 3.10.1 of Flutter
+    git checkout 3.10.1
     # Get back to current working directory
     cd "$current_dir"
 
-    echo "Switched to Flutter version 3.7.5"
+    echo "Switched to Flutter version 3.10.1"
 fi
 
 # Enable linux desktop

+ 6 - 6
frontend/scripts/install_dev_env/install_macos.sh

@@ -41,9 +41,9 @@ printMessage "Setting up Flutter"
 
 # Get the current Flutter version
 FLUTTER_VERSION=$(flutter --version | grep -oE 'Flutter [^ ]+' | grep -oE '[^ ]+$')
-# Check if the current version is 3.7.5
-if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
-   echo "Flutter version is already 3.7.5"
+# Check if the current version is 3.10.1
+if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
+   echo "Flutter version is already 3.10.1"
 else
    # Get the path to the Flutter SDK
    FLUTTER_PATH=$(which flutter)
@@ -52,12 +52,12 @@ else
    current_dir=$(pwd)
 
    cd $FLUTTER_PATH
-   # Use git to checkout version 3.7.5 of Flutter
-   git checkout 3.7.5
+   # Use git to checkout version 3.10.1 of Flutter
+   git checkout 3.10.1
    # Get back to current working directory
    cd "$current_dir"
 
-   echo "Switched to Flutter version 3.7.5"
+   echo "Switched to Flutter version 3.10.1"
 fi
 
 # Enable linux desktop

+ 6 - 6
frontend/scripts/install_dev_env/install_windows.sh

@@ -48,9 +48,9 @@ fi
 printMessage "Setting up Flutter"
 # Get the current Flutter version
 FLUTTER_VERSION=$(flutter --version | grep -oP 'Flutter \K\S+')
-# Check if the current version is 3.7.5
-if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
-   echo "Flutter version is already 3.7.5"
+# Check if the current version is 3.10.1
+if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
+   echo "Flutter version is already 3.10.1"
 else
    # Get the path to the Flutter SDK
    FLUTTER_PATH=$(which flutter)
@@ -59,12 +59,12 @@ else
    current_dir=$(pwd)
 
    cd $FLUTTER_PATH
-   # Use git to checkout version 3.7.5 of Flutter
-   git checkout 3.7.5
+   # Use git to checkout version 3.10.1 of Flutter
+   git checkout 3.10.1
    # Get back to current working directory
    cd "$current_dir"
 
-   echo "Switched to Flutter version 3.7.5"
+   echo "Switched to Flutter version 3.10.1"
 fi
 
 # Add pub cache and cargo to PATH

+ 8 - 8
frontend/scripts/makefile/flutter.toml

@@ -189,8 +189,8 @@ script = [
   cd appflowy_flutter
   flutter clean
   flutter packages pub get
-  flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
-  flutter packages pub run build_runner build --delete-conflicting-outputs
+  dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
+  dart run build_runner build -d
   """,
 ]
 
@@ -201,8 +201,8 @@ script = [
   cd ./appflowy_flutter/
   exec cmd.exe /c flutter clean
   exec cmd.exe /c flutter packages pub get
-  exec cmd.exe /c flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
-  exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
+  exec cmd.exe /c dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
+  exec cmd.exe /c dart run build_runner build -d
   """,
 ]
 
@@ -211,8 +211,8 @@ script_runner = "@shell"
 script = [
   """
   cd appflowy_flutter
-  flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
-  flutter packages pub run build_runner build --delete-conflicting-outputs
+  dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
+  dart run build_runner build -d
   """,
 ]
 
@@ -221,7 +221,7 @@ script_runner = "@duckscript"
 script = [
   """
   cd ./appflowy_flutter/
-  exec cmd.exe /c flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
-  exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
+  exec cmd.exe /c dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
+  exec cmd.exe /c dart run build_runner build -d
   """,
 ]

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott