Skip to content

Commit

Permalink
Merge branch 'main' into auto_updater_macos
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Feb 7, 2025
2 parents 4bf8c01 + fc9c152 commit d3fedfc
Show file tree
Hide file tree
Showing 139 changed files with 717 additions and 563 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android_ci.yaml.bak
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.22.3"
FLUTTER_VERSION: "3.27.4"
RUST_TOOLCHAIN: "1.81.0"
CARGO_MAKE_VERSION: "0.37.18"
CLOUD_VERSION: 0.6.54-amd64
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/flutter_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:

env:
CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.22.2"
FLUTTER_VERSION: "3.27.4"
RUST_TOOLCHAIN: "1.81.0"
CARGO_MAKE_VERSION: "0.37.18"
CLOUD_VERSION: 0.6.54-amd64
Expand All @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
flutter_profile: development-linux-x86_64
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ windows-latest ]
os: [windows-latest]
include:
- os: windows-latest
flutter_profile: development-windows-x86
Expand All @@ -101,7 +101,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ macos-latest ]
os: [macos-latest]
include:
- os: macos-latest
flutter_profile: development-mac-x86_64
Expand All @@ -123,12 +123,12 @@ jobs:
flutter_profile: ${{ matrix.flutter_profile }}

unit_test:
needs: [ prepare-linux ]
needs: [prepare-linux]
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
flutter_profile: development-linux-x86_64
Expand Down Expand Up @@ -217,11 +217,11 @@ jobs:
shell: bash

cloud_integration_test:
needs: [ prepare-linux ]
needs: [prepare-linux]
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
include:
- os: ubuntu-latest
flutter_profile: development-linux-x86_64
Expand Down Expand Up @@ -340,13 +340,13 @@ jobs:
shell: bash

integration_test:
needs: [ prepare-linux ]
needs: [prepare-linux]
if: github.event.pull_request.draft != true
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
test_number: [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
os: [ubuntu-latest]
test_number: [1, 2, 3, 4, 5, 6, 7, 8, 9]
include:
- os: ubuntu-latest
target: "x86_64-unknown-linux-gnu"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- "!frontend/appflowy_web_app/**"

env:
FLUTTER_VERSION: "3.22.3"
FLUTTER_VERSION: "3.27.4"
RUST_TOOLCHAIN: "1.81.0"

concurrency:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "*"

env:
FLUTTER_VERSION: "3.22.0"
FLUTTER_VERSION: "3.27.4"
RUST_TOOLCHAIN: "1.81.0"

jobs:
Expand Down Expand Up @@ -232,10 +232,10 @@ jobs:
matrix:
job:
- {
targets: "aarch64-apple-darwin,x86_64-apple-darwin",
os: macos-latest,
extra-build-args: "",
}
targets: "aarch64-apple-darwin,x86_64-apple-darwin",
os: macos-latest,
extra-build-args: "",
}
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down Expand Up @@ -336,12 +336,12 @@ jobs:
matrix:
job:
- {
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-args: "",
flutter_profile: production-linux-x86_64,
}
arch: x86_64,
target: x86_64-unknown-linux-gnu,
os: ubuntu-20.04,
extra-build-args: "",
flutter_profile: production-linux-x86_64,
}
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.22.0"
FLUTTER_VERSION: "3.27.4"
RUST_TOOLCHAIN: "1.81.0"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ workflows:
instance_type: mac_mini_m2
max_build_duration: 30
environment:
flutter: 3.22.3
flutter: 3.27.4
xcode: latest
cocoapods: default

Expand Down
3 changes: 1 addition & 2 deletions frontend/appflowy_flutter/integration_test/shared/emoji.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:appflowy/shared/icon_emoji_picker/icon_picker.dart';
import 'package:appflowy/shared/icon_emoji_picker/icon_uploader.dart';
import 'package:appflowy/shared/icon_emoji_picker/tab.dart';
import 'package:appflowy/workspace/presentation/home/menu/sidebar/space/space_icon_popup.dart';
import 'package:cross_file/cross_file.dart';
import 'package:desktop_drop/desktop_drop.dart';
import 'package:flowy_infra_ui/style_widget/primary_rounded_button.dart';
import 'package:flowy_svg/flowy_svg.dart';
Expand Down Expand Up @@ -90,7 +89,7 @@ extension EmojiTestExtension on WidgetTester {
final dropTargetWidget = dropTarget.evaluate().first.widget as DropTarget;
dropTargetWidget.onDragDone?.call(
DropDoneDetails(
files: [XFile(icon.emoji)],
files: [DropItemFile(icon.emoji)],
localPosition: Offset.zero,
globalPosition: Offset.zero,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class _PromptInputMentionPageMenuState
void initState() {
super.initState();
Future.delayed(Duration.zero, () {
context.read<ChatInputControlCubit>().refreshViews();
if (mounted) {
context.read<ChatInputControlCubit>().refreshViews();
}
});
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/appflowy_flutter/lib/env/cloud_env.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Future<void> useLocalServer() async {
await _setAuthenticatorType(AuthenticatorType.local);
}

/// Use getIt<AppFlowyCloudSharedEnv>() to get the shared environment.
// Use getIt<AppFlowyCloudSharedEnv>() to get the shared environment.
class AppFlowyCloudSharedEnv {
AppFlowyCloudSharedEnv({
required AuthenticatorType authenticatorType,
Expand Down
4 changes: 2 additions & 2 deletions frontend/appflowy_flutter/lib/flutter/af_dropdown_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,11 @@ class _AFDropdownMenuState<T> extends State<AFDropdownMenu<T>> {

// Simulate the focused state because the text field should always be focused
// during traversal. If the menu item has a custom foreground color, the "focused"
// color will also change to foregroundColor.withOpacity(0.12).
// color will also change to foregroundColor.withValues(alpha: 0.12).
effectiveStyle = entry.enabled && i == focusedIndex
? effectiveStyle.copyWith(
backgroundColor: WidgetStatePropertyAll<Color>(
focusedBackgroundColor.withOpacity(0.12),
focusedBackgroundColor.withValues(alpha: 0.12),
),
)
: effectiveStyle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class MobileViewPageImmersiveAppBar extends StatelessWidget
valueListenable: appBarOpacity,
builder: (_, opacity, __) => FlowyAppBar(
backgroundColor:
AppBarTheme.of(context).backgroundColor?.withOpacity(opacity),
AppBarTheme.of(context).backgroundColor?.withValues(alpha: opacity),
showDivider: false,
title: Opacity(opacity: opacity >= 0.99 ? 1.0 : 0, child: title),
leadingWidth: 44,
Expand Down Expand Up @@ -224,7 +224,7 @@ class _ImmersiveAppBarButton extends StatelessWidget {
child = DecoratedBox(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(dimension / 2.0),
color: Colors.black.withOpacity(0.2),
color: Colors.black.withValues(alpha: 0.2),
),
child: child,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Future<T?> showMobileBottomSheet<T>(
backgroundColor ??= Theme.of(context).brightness == Brightness.light
? const Color(0xFFF7F8FB)
: const Color(0xFF23262B);
barrierColor ??= Colors.black.withOpacity(0.3);
barrierColor ??= Colors.black.withValues(alpha: 0.3);

return showModalBottomSheet<T>(
context: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class CupertinoSheetBottomRouteTransition extends StatelessWidget {
(Theme.of(context).brightness == Brightness.dark
? Colors.grey
: Colors.black)
.withOpacity(secondaryAnimation.value * 0.1),
.withValues(alpha: secondaryAnimation.value * 0.1),
BlendMode.srcOver,
),
child: child,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:flutter/material.dart';

import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/mobile/presentation/database/board/board.dart';
Expand All @@ -19,6 +17,7 @@ import 'package:appflowy_board/appflowy_board.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';

Expand Down Expand Up @@ -276,14 +275,20 @@ class _BoardContentState extends State<_BoardContent> {
border: themeMode == ThemeMode.light
? Border.fromBorderSide(
BorderSide(
color: Theme.of(context).colorScheme.outline.withOpacity(0.5),
color: Theme.of(context)
.colorScheme
.outline
.withValues(alpha: 0.5),
),
)
: null,
boxShadow: themeMode == ThemeMode.light
? [
BoxShadow(
color: Theme.of(context).colorScheme.outline.withOpacity(0.5),
color: Theme.of(context)
.colorScheme
.outline
.withValues(alpha: 0.5),
blurRadius: 4,
offset: const Offset(0, 2),
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:flutter/material.dart';

import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/mobile/presentation/base/app_bar/app_bar.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_full_field_editor.dart';
Expand All @@ -8,6 +6,7 @@ import 'package:appflowy/plugins/database/domain/field_backend_service.dart';
import 'package:appflowy/plugins/database/domain/field_service.dart';
import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

class MobileEditPropertyScreen extends StatefulWidget {
Expand Down Expand Up @@ -49,7 +48,7 @@ class _MobileEditPropertyScreenState extends State<MobileEditPropertyScreen> {
final fieldId = widget.field.id;

return PopScope(
onPopInvoked: (didPop) {
onPopInvokedWithResult: (didPop, _) {
if (!didPop) {
context.pop(_fieldOptionValues);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ class MobileDatabaseViewQuickActions extends StatelessWidget {
);
},
builder: (_) => const SizedBox.shrink(),
).then((_) => Navigator.pop(context));
).then((_) {
if (context.mounted) {
Navigator.pop(context);
}
});
},
!isInline,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class _DeletedFilesListView extends StatelessWidget {
?.copyWith(color: theme.colorScheme.onSurface),
),
horizontalTitleGap: 0,
tileColor: theme.colorScheme.onSurface.withOpacity(0.1),
tileColor: theme.colorScheme.onSurface.withValues(alpha: 0.1),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ class _RecentCover extends StatelessWidget {
Widget build(BuildContext context) {
final placeholder = Container(
// random color, update it once we have a better placeholder
color: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.2),
color:
Theme.of(context).colorScheme.onSurfaceVariant.withValues(alpha: 0.2),
);
final value = this.value;
if (value == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class MobileViewPage extends StatelessWidget {
Widget _buildLastViewed(BuildContext context) {
final textColor = Theme.of(context).isLightMode
? const Color(0x7F171717)
: Colors.white.withOpacity(0.45);
: Colors.white.withValues(alpha: 0.45);
if (timestamp == null) {
return const SizedBox.shrink();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FloatingAIEntry extends StatelessWidget {
blurRadius: 20,
spreadRadius: 1,
offset: const Offset(0, 4),
color: Colors.black.withOpacity(0.05),
color: Colors.black.withValues(alpha: 0.05),
),
],
);
Expand All @@ -51,8 +51,8 @@ class FloatingAIEntry extends StatelessWidget {
BoxDecoration _buildWrapperDecoration(BuildContext context) {
final outlineColor = Theme.of(context).colorScheme.outline;
final borderColor = Theme.of(context).isLightMode
? outlineColor.withOpacity(0.7)
: outlineColor.withOpacity(0.3);
? outlineColor.withValues(alpha: 0.7)
: outlineColor.withValues(alpha: 0.3);
return BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: Theme.of(context).colorScheme.surface,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ class _MobileSpaceTabState extends State<MobileSpaceTab>
);
case MobileSpaceTabType.favorites:
return MobileFavoriteSpace(userProfile: widget.userProfile);
default:
throw Exception('Unknown tab type: $tab');
}
}).toList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class _CreateWorkspaceButton extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: const Color(0x01717171).withOpacity(0.12),
color: const Color(0x01717171).withValues(alpha: 0.12),
width: 0.8,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ class WorkspaceMenuMoreOptions extends StatelessWidget {
WorkspaceMenuMoreOption.leave,
),
);
default:
return const Placeholder();
}
}
}
Loading

0 comments on commit d3fedfc

Please sign in to comment.