mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-06-28 09:44:28 -04:00
chore: upgrade to Flutter 3.27.4 (#7230)
This commit is contained in:
parent
17ae05a623
commit
00cdee831d
132 changed files with 636 additions and 506 deletions
2
.github/workflows/android_ci.yaml.bak
vendored
2
.github/workflows/android_ci.yaml.bak
vendored
|
@ -18,7 +18,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
FLUTTER_VERSION: "3.22.3"
|
FLUTTER_VERSION: "3.27.4"
|
||||||
RUST_TOOLCHAIN: "1.81.0"
|
RUST_TOOLCHAIN: "1.81.0"
|
||||||
CARGO_MAKE_VERSION: "0.37.18"
|
CARGO_MAKE_VERSION: "0.37.18"
|
||||||
CLOUD_VERSION: 0.6.54-amd64
|
CLOUD_VERSION: 0.6.54-amd64
|
||||||
|
|
22
.github/workflows/flutter_ci.yaml
vendored
22
.github/workflows/flutter_ci.yaml
vendored
|
@ -25,7 +25,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
FLUTTER_VERSION: "3.22.2"
|
FLUTTER_VERSION: "3.27.4"
|
||||||
RUST_TOOLCHAIN: "1.81.0"
|
RUST_TOOLCHAIN: "1.81.0"
|
||||||
CARGO_MAKE_VERSION: "0.37.18"
|
CARGO_MAKE_VERSION: "0.37.18"
|
||||||
CLOUD_VERSION: 0.6.54-amd64
|
CLOUD_VERSION: 0.6.54-amd64
|
||||||
|
@ -40,7 +40,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest ]
|
os: [ubuntu-latest]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
flutter_profile: development-linux-x86_64
|
flutter_profile: development-linux-x86_64
|
||||||
|
@ -74,7 +74,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os: [ windows-latest ]
|
os: [windows-latest]
|
||||||
include:
|
include:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
flutter_profile: development-windows-x86
|
flutter_profile: development-windows-x86
|
||||||
|
@ -101,7 +101,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os: [ macos-latest ]
|
os: [macos-latest]
|
||||||
include:
|
include:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
flutter_profile: development-mac-x86_64
|
flutter_profile: development-mac-x86_64
|
||||||
|
@ -123,12 +123,12 @@ jobs:
|
||||||
flutter_profile: ${{ matrix.flutter_profile }}
|
flutter_profile: ${{ matrix.flutter_profile }}
|
||||||
|
|
||||||
unit_test:
|
unit_test:
|
||||||
needs: [ prepare-linux ]
|
needs: [prepare-linux]
|
||||||
if: github.event.pull_request.draft != true
|
if: github.event.pull_request.draft != true
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest ]
|
os: [ubuntu-latest]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
flutter_profile: development-linux-x86_64
|
flutter_profile: development-linux-x86_64
|
||||||
|
@ -217,11 +217,11 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
cloud_integration_test:
|
cloud_integration_test:
|
||||||
needs: [ prepare-linux ]
|
needs: [prepare-linux]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest ]
|
os: [ubuntu-latest]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
flutter_profile: development-linux-x86_64
|
flutter_profile: development-linux-x86_64
|
||||||
|
@ -340,13 +340,13 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
integration_test:
|
integration_test:
|
||||||
needs: [ prepare-linux ]
|
needs: [prepare-linux]
|
||||||
if: github.event.pull_request.draft != true
|
if: github.event.pull_request.draft != true
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest ]
|
os: [ubuntu-latest]
|
||||||
test_number: [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
test_number: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: "x86_64-unknown-linux-gnu"
|
target: "x86_64-unknown-linux-gnu"
|
||||||
|
|
2
.github/workflows/ios_ci.yaml
vendored
2
.github/workflows/ios_ci.yaml
vendored
|
@ -18,7 +18,7 @@ on:
|
||||||
- "!frontend/appflowy_web_app/**"
|
- "!frontend/appflowy_web_app/**"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FLUTTER_VERSION: "3.22.3"
|
FLUTTER_VERSION: "3.27.4"
|
||||||
RUST_TOOLCHAIN: "1.81.0"
|
RUST_TOOLCHAIN: "1.81.0"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
|
@ -6,7 +6,7 @@ on:
|
||||||
- "*"
|
- "*"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FLUTTER_VERSION: "3.22.0"
|
FLUTTER_VERSION: "3.27.4"
|
||||||
RUST_TOOLCHAIN: "1.81.0"
|
RUST_TOOLCHAIN: "1.81.0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -232,10 +232,10 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
- {
|
- {
|
||||||
targets: "aarch64-apple-darwin,x86_64-apple-darwin",
|
targets: "aarch64-apple-darwin,x86_64-apple-darwin",
|
||||||
os: macos-latest,
|
os: macos-latest,
|
||||||
extra-build-args: "",
|
extra-build-args: "",
|
||||||
}
|
}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -336,12 +336,12 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
- {
|
- {
|
||||||
arch: x86_64,
|
arch: x86_64,
|
||||||
target: x86_64-unknown-linux-gnu,
|
target: x86_64-unknown-linux-gnu,
|
||||||
os: ubuntu-20.04,
|
os: ubuntu-20.04,
|
||||||
extra-build-args: "",
|
extra-build-args: "",
|
||||||
flutter_profile: production-linux-x86_64,
|
flutter_profile: production-linux-x86_64,
|
||||||
}
|
}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
2
.github/workflows/rust_coverage.yml
vendored
2
.github/workflows/rust_coverage.yml
vendored
|
@ -10,7 +10,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
FLUTTER_VERSION: "3.22.0"
|
FLUTTER_VERSION: "3.27.4"
|
||||||
RUST_TOOLCHAIN: "1.81.0"
|
RUST_TOOLCHAIN: "1.81.0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
@ -4,7 +4,7 @@ workflows:
|
||||||
instance_type: mac_mini_m2
|
instance_type: mac_mini_m2
|
||||||
max_build_duration: 30
|
max_build_duration: 30
|
||||||
environment:
|
environment:
|
||||||
flutter: 3.22.3
|
flutter: 3.27.4
|
||||||
xcode: latest
|
xcode: latest
|
||||||
cocoapods: default
|
cocoapods: default
|
||||||
|
|
||||||
|
|
|
@ -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/icon_uploader.dart';
|
||||||
import 'package:appflowy/shared/icon_emoji_picker/tab.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: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:desktop_drop/desktop_drop.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/primary_rounded_button.dart';
|
import 'package:flowy_infra_ui/style_widget/primary_rounded_button.dart';
|
||||||
import 'package:flowy_svg/flowy_svg.dart';
|
import 'package:flowy_svg/flowy_svg.dart';
|
||||||
|
@ -90,7 +89,7 @@ extension EmojiTestExtension on WidgetTester {
|
||||||
final dropTargetWidget = dropTarget.evaluate().first.widget as DropTarget;
|
final dropTargetWidget = dropTarget.evaluate().first.widget as DropTarget;
|
||||||
dropTargetWidget.onDragDone?.call(
|
dropTargetWidget.onDragDone?.call(
|
||||||
DropDoneDetails(
|
DropDoneDetails(
|
||||||
files: [XFile(icon.emoji)],
|
files: [DropItemFile(icon.emoji)],
|
||||||
localPosition: Offset.zero,
|
localPosition: Offset.zero,
|
||||||
globalPosition: Offset.zero,
|
globalPosition: Offset.zero,
|
||||||
),
|
),
|
||||||
|
|
|
@ -49,7 +49,9 @@ class _PromptInputMentionPageMenuState
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
Future.delayed(Duration.zero, () {
|
Future.delayed(Duration.zero, () {
|
||||||
context.read<ChatInputControlCubit>().refreshViews();
|
if (mounted) {
|
||||||
|
context.read<ChatInputControlCubit>().refreshViews();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ Future<void> useLocalServer() async {
|
||||||
await _setAuthenticatorType(AuthenticatorType.local);
|
await _setAuthenticatorType(AuthenticatorType.local);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Use getIt<AppFlowyCloudSharedEnv>() to get the shared environment.
|
// Use getIt<AppFlowyCloudSharedEnv>() to get the shared environment.
|
||||||
class AppFlowyCloudSharedEnv {
|
class AppFlowyCloudSharedEnv {
|
||||||
AppFlowyCloudSharedEnv({
|
AppFlowyCloudSharedEnv({
|
||||||
required AuthenticatorType authenticatorType,
|
required AuthenticatorType authenticatorType,
|
||||||
|
|
|
@ -502,11 +502,11 @@ class _AFDropdownMenuState<T> extends State<AFDropdownMenu<T>> {
|
||||||
|
|
||||||
// Simulate the focused state because the text field should always be focused
|
// 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"
|
// 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 = entry.enabled && i == focusedIndex
|
||||||
? effectiveStyle.copyWith(
|
? effectiveStyle.copyWith(
|
||||||
backgroundColor: WidgetStatePropertyAll<Color>(
|
backgroundColor: WidgetStatePropertyAll<Color>(
|
||||||
focusedBackgroundColor.withOpacity(0.12),
|
focusedBackgroundColor.withValues(alpha: 0.12),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: effectiveStyle;
|
: effectiveStyle;
|
||||||
|
|
|
@ -43,7 +43,7 @@ class MobileViewPageImmersiveAppBar extends StatelessWidget
|
||||||
valueListenable: appBarOpacity,
|
valueListenable: appBarOpacity,
|
||||||
builder: (_, opacity, __) => FlowyAppBar(
|
builder: (_, opacity, __) => FlowyAppBar(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
AppBarTheme.of(context).backgroundColor?.withOpacity(opacity),
|
AppBarTheme.of(context).backgroundColor?.withValues(alpha: opacity),
|
||||||
showDivider: false,
|
showDivider: false,
|
||||||
title: Opacity(opacity: opacity >= 0.99 ? 1.0 : 0, child: title),
|
title: Opacity(opacity: opacity >= 0.99 ? 1.0 : 0, child: title),
|
||||||
leadingWidth: 44,
|
leadingWidth: 44,
|
||||||
|
@ -224,7 +224,7 @@ class _ImmersiveAppBarButton extends StatelessWidget {
|
||||||
child = DecoratedBox(
|
child = DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(dimension / 2.0),
|
borderRadius: BorderRadius.circular(dimension / 2.0),
|
||||||
color: Colors.black.withOpacity(0.2),
|
color: Colors.black.withValues(alpha: 0.2),
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
|
|
|
@ -74,7 +74,7 @@ Future<T?> showMobileBottomSheet<T>(
|
||||||
backgroundColor ??= Theme.of(context).brightness == Brightness.light
|
backgroundColor ??= Theme.of(context).brightness == Brightness.light
|
||||||
? const Color(0xFFF7F8FB)
|
? const Color(0xFFF7F8FB)
|
||||||
: const Color(0xFF23262B);
|
: const Color(0xFF23262B);
|
||||||
barrierColor ??= Colors.black.withOpacity(0.3);
|
barrierColor ??= Colors.black.withValues(alpha: 0.3);
|
||||||
|
|
||||||
return showModalBottomSheet<T>(
|
return showModalBottomSheet<T>(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
|
@ -329,7 +329,7 @@ class CupertinoSheetBottomRouteTransition extends StatelessWidget {
|
||||||
(Theme.of(context).brightness == Brightness.dark
|
(Theme.of(context).brightness == Brightness.dark
|
||||||
? Colors.grey
|
? Colors.grey
|
||||||
: Colors.black)
|
: Colors.black)
|
||||||
.withOpacity(secondaryAnimation.value * 0.1),
|
.withValues(alpha: secondaryAnimation.value * 0.1),
|
||||||
BlendMode.srcOver,
|
BlendMode.srcOver,
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/mobile/presentation/database/board/board.dart';
|
import 'package:appflowy/mobile/presentation/database/board/board.dart';
|
||||||
|
@ -19,6 +17,7 @@ import 'package:appflowy_board/appflowy_board.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
||||||
|
@ -276,14 +275,20 @@ class _BoardContentState extends State<_BoardContent> {
|
||||||
border: themeMode == ThemeMode.light
|
border: themeMode == ThemeMode.light
|
||||||
? Border.fromBorderSide(
|
? Border.fromBorderSide(
|
||||||
BorderSide(
|
BorderSide(
|
||||||
color: Theme.of(context).colorScheme.outline.withOpacity(0.5),
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.outline
|
||||||
|
.withValues(alpha: 0.5),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
boxShadow: themeMode == ThemeMode.light
|
boxShadow: themeMode == ThemeMode.light
|
||||||
? [
|
? [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Theme.of(context).colorScheme.outline.withOpacity(0.5),
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.outline
|
||||||
|
.withValues(alpha: 0.5),
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/locale_keys.g.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/base/app_bar/app_bar.dart';
|
||||||
import 'package:appflowy/mobile/presentation/database/field/mobile_full_field_editor.dart';
|
import 'package:appflowy/mobile/presentation/database/field/mobile_full_field_editor.dart';
|
||||||
|
@ -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/domain/field_service.dart';
|
||||||
import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart';
|
import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
||||||
class MobileEditPropertyScreen extends StatefulWidget {
|
class MobileEditPropertyScreen extends StatefulWidget {
|
||||||
|
@ -49,7 +48,7 @@ class _MobileEditPropertyScreenState extends State<MobileEditPropertyScreen> {
|
||||||
final fieldId = widget.field.id;
|
final fieldId = widget.field.id;
|
||||||
|
|
||||||
return PopScope(
|
return PopScope(
|
||||||
onPopInvoked: (didPop) {
|
onPopInvokedWithResult: (didPop, _) {
|
||||||
if (!didPop) {
|
if (!didPop) {
|
||||||
context.pop(_fieldOptionValues);
|
context.pop(_fieldOptionValues);
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,11 @@ class MobileDatabaseViewQuickActions extends StatelessWidget {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
builder: (_) => const SizedBox.shrink(),
|
builder: (_) => const SizedBox.shrink(),
|
||||||
).then((_) => Navigator.pop(context));
|
).then((_) {
|
||||||
|
if (context.mounted) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
!isInline,
|
!isInline,
|
||||||
),
|
),
|
||||||
|
|
|
@ -212,7 +212,7 @@ class _DeletedFilesListView extends StatelessWidget {
|
||||||
?.copyWith(color: theme.colorScheme.onSurface),
|
?.copyWith(color: theme.colorScheme.onSurface),
|
||||||
),
|
),
|
||||||
horizontalTitleGap: 0,
|
horizontalTitleGap: 0,
|
||||||
tileColor: theme.colorScheme.onSurface.withOpacity(0.1),
|
tileColor: theme.colorScheme.onSurface.withValues(alpha: 0.1),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
|
|
|
@ -134,7 +134,8 @@ class _RecentCover extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final placeholder = Container(
|
final placeholder = Container(
|
||||||
// random color, update it once we have a better placeholder
|
// 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;
|
final value = this.value;
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
|
|
@ -225,7 +225,7 @@ class MobileViewPage extends StatelessWidget {
|
||||||
Widget _buildLastViewed(BuildContext context) {
|
Widget _buildLastViewed(BuildContext context) {
|
||||||
final textColor = Theme.of(context).isLightMode
|
final textColor = Theme.of(context).isLightMode
|
||||||
? const Color(0x7F171717)
|
? const Color(0x7F171717)
|
||||||
: Colors.white.withOpacity(0.45);
|
: Colors.white.withValues(alpha: 0.45);
|
||||||
if (timestamp == null) {
|
if (timestamp == null) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ class FloatingAIEntry extends StatelessWidget {
|
||||||
blurRadius: 20,
|
blurRadius: 20,
|
||||||
spreadRadius: 1,
|
spreadRadius: 1,
|
||||||
offset: const Offset(0, 4),
|
offset: const Offset(0, 4),
|
||||||
color: Colors.black.withOpacity(0.05),
|
color: Colors.black.withValues(alpha: 0.05),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -51,8 +51,8 @@ class FloatingAIEntry extends StatelessWidget {
|
||||||
BoxDecoration _buildWrapperDecoration(BuildContext context) {
|
BoxDecoration _buildWrapperDecoration(BuildContext context) {
|
||||||
final outlineColor = Theme.of(context).colorScheme.outline;
|
final outlineColor = Theme.of(context).colorScheme.outline;
|
||||||
final borderColor = Theme.of(context).isLightMode
|
final borderColor = Theme.of(context).isLightMode
|
||||||
? outlineColor.withOpacity(0.7)
|
? outlineColor.withValues(alpha: 0.7)
|
||||||
: outlineColor.withOpacity(0.3);
|
: outlineColor.withValues(alpha: 0.3);
|
||||||
return BoxDecoration(
|
return BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(30),
|
borderRadius: BorderRadius.circular(30),
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
|
|
|
@ -173,8 +173,6 @@ class _MobileSpaceTabState extends State<MobileSpaceTab>
|
||||||
);
|
);
|
||||||
case MobileSpaceTabType.favorites:
|
case MobileSpaceTabType.favorites:
|
||||||
return MobileFavoriteSpace(userProfile: widget.userProfile);
|
return MobileFavoriteSpace(userProfile: widget.userProfile);
|
||||||
default:
|
|
||||||
throw Exception('Unknown tab type: $tab');
|
|
||||||
}
|
}
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ class _CreateWorkspaceButton extends StatelessWidget {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: const Color(0x01717171).withOpacity(0.12),
|
color: const Color(0x01717171).withValues(alpha: 0.12),
|
||||||
width: 0.8,
|
width: 0.8,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -101,8 +101,6 @@ class WorkspaceMenuMoreOptions extends StatelessWidget {
|
||||||
WorkspaceMenuMoreOption.leave,
|
WorkspaceMenuMoreOption.leave,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
default:
|
|
||||||
return const Placeholder();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,14 +365,14 @@ class _NotificationNavigationBar extends StatelessWidget {
|
||||||
extension on BuildContext {
|
extension on BuildContext {
|
||||||
Color get backgroundColor {
|
Color get backgroundColor {
|
||||||
return Theme.of(this).isLightMode
|
return Theme.of(this).isLightMode
|
||||||
? Colors.white.withOpacity(0.95)
|
? Colors.white.withValues(alpha: 0.95)
|
||||||
: const Color(0xFF23262B).withOpacity(0.95);
|
: const Color(0xFF23262B).withValues(alpha: 0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
Color get borderColor {
|
Color get borderColor {
|
||||||
return Theme.of(this).isLightMode
|
return Theme.of(this).isLightMode
|
||||||
? const Color(0x141F2329)
|
? const Color(0x141F2329)
|
||||||
: const Color(0xFF23262B).withOpacity(0.5);
|
: const Color(0xFF23262B).withValues(alpha: 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
Border? get border {
|
Border? get border {
|
||||||
|
|
|
@ -6,6 +6,6 @@ extension NotificationItemColors on BuildContext {
|
||||||
if (Theme.of(this).isLightMode) {
|
if (Theme.of(this).isLightMode) {
|
||||||
return const Color(0xFF171717);
|
return const Color(0xFF171717);
|
||||||
}
|
}
|
||||||
return const Color(0xFFffffff).withOpacity(0.8);
|
return const Color(0xFFffffff).withValues(alpha: 0.8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,6 @@ class RTLSetting extends StatelessWidget {
|
||||||
case AppFlowyTextDirection.rtl:
|
case AppFlowyTextDirection.rtl:
|
||||||
return LocaleKeys.settings_appearance_textDirection_rtl.tr();
|
return LocaleKeys.settings_appearance_textDirection_rtl.tr();
|
||||||
case AppFlowyTextDirection.ltr:
|
case AppFlowyTextDirection.ltr:
|
||||||
default:
|
|
||||||
return LocaleKeys.settings_appearance_textDirection_ltr.tr();
|
return LocaleKeys.settings_appearance_textDirection_ltr.tr();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,7 +299,7 @@ class _Toggle extends StatelessWidget {
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
child: CupertinoSwitch(
|
child: CupertinoSwitch(
|
||||||
value: value,
|
value: value,
|
||||||
activeColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor: Theme.of(context).colorScheme.primary,
|
||||||
onChanged: onChanged,
|
onChanged: onChanged,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -99,7 +99,7 @@ Future<T?> showFlowyCupertinoConfirmDialog<T>({
|
||||||
}) {
|
}) {
|
||||||
return showDialog(
|
return showDialog(
|
||||||
context: context ?? AppGlobals.context,
|
context: context ?? AppGlobals.context,
|
||||||
barrierColor: Colors.black.withOpacity(0.25),
|
barrierColor: Colors.black.withValues(alpha: 0.25),
|
||||||
builder: (context) => CupertinoAlertDialog(
|
builder: (context) => CupertinoAlertDialog(
|
||||||
title: FlowyText.medium(
|
title: FlowyText.medium(
|
||||||
title,
|
title,
|
||||||
|
|
|
@ -7,10 +7,9 @@ import 'package:diffutil_dart/diffutil.dart' as diffutil;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_chat_core/flutter_chat_core.dart';
|
import 'package:flutter_chat_core/flutter_chat_core.dart';
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
import 'package:flutter_chat_ui/src/scroll_to_bottom.dart';
|
import 'package:flutter_chat_ui/src/scroll_to_bottom.dart';
|
||||||
import 'package:flutter_chat_ui/src/utils/message_list_diff.dart';
|
import 'package:flutter_chat_ui/src/utils/message_list_diff.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ChatAnimatedListReversed extends StatefulWidget {
|
class ChatAnimatedListReversed extends StatefulWidget {
|
||||||
const ChatAnimatedListReversed({
|
const ChatAnimatedListReversed({
|
||||||
|
|
|
@ -75,7 +75,8 @@ class ChatEditorStyleCustomizer extends EditorStyleCustomizer {
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
backgroundColor: theme.colorScheme.inverseSurface.withOpacity(0.8),
|
backgroundColor:
|
||||||
|
theme.colorScheme.inverseSurface.withValues(alpha: 0.8),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -144,7 +145,7 @@ class ChatEditorStyleCustomizer extends EditorStyleCustomizer {
|
||||||
return TextStyle(
|
return TextStyle(
|
||||||
fontFamily: defaultFontFamily,
|
fontFamily: defaultFontFamily,
|
||||||
height: 1.5,
|
height: 1.5,
|
||||||
color: AFThemeExtension.of(context).onBackground.withOpacity(0.6),
|
color: AFThemeExtension.of(context).onBackground.withValues(alpha: 0.6),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,14 +125,14 @@ class WelcomeSampleQuestion extends StatelessWidget {
|
||||||
spreadRadius: -2,
|
spreadRadius: -2,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
|
@ -140,7 +140,7 @@ class WelcomeSampleQuestion extends StatelessWidget {
|
||||||
spreadRadius: 2,
|
spreadRadius: 2,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -89,14 +89,14 @@ class _AIMessageActionBarState extends State<AIMessageActionBar> {
|
||||||
spreadRadius: -2,
|
spreadRadius: -2,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
|
@ -104,7 +104,7 @@ class _AIMessageActionBarState extends State<AIMessageActionBar> {
|
||||||
spreadRadius: 2,
|
spreadRadius: 2,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -340,14 +340,14 @@ class _ChangeFormatPopoverContentState
|
||||||
spreadRadius: -2,
|
spreadRadius: -2,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
|
@ -355,7 +355,7 @@ class _ChangeFormatPopoverContentState
|
||||||
spreadRadius: 2,
|
spreadRadius: 2,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x051F2329)
|
? const Color(0x051F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.02),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -41,21 +41,21 @@ class CustomScrollToBottom extends StatelessWidget {
|
||||||
spreadRadius: 8,
|
spreadRadius: 8,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x0F1F2329)
|
? const Color(0x0F1F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.06),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.06),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: const Offset(0, 4),
|
offset: const Offset(0, 4),
|
||||||
blurRadius: 8,
|
blurRadius: 8,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x141F2329)
|
? const Color(0x141F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.08),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.08),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
color: isLightMode
|
color: isLightMode
|
||||||
? const Color(0x1F1F2329)
|
? const Color(0x1F1F2329)
|
||||||
: Theme.of(context).shadowColor.withOpacity(0.12),
|
: Theme.of(context).shadowColor.withValues(alpha: 0.12),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:appflowy/util/field_type_extension.dart';
|
|
||||||
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
|
||||||
import 'package:flutter/material.dart' hide Card;
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/mobile/presentation/database/board/mobile_board_page.dart';
|
import 'package:appflowy/mobile/presentation/database/board/mobile_board_page.dart';
|
||||||
|
@ -20,6 +15,8 @@ import 'package:appflowy/plugins/database/widgets/cell/card_cell_style_maps/desk
|
||||||
import 'package:appflowy/plugins/database/widgets/row/row_detail.dart';
|
import 'package:appflowy/plugins/database/widgets/row/row_detail.dart';
|
||||||
import 'package:appflowy/shared/conditional_listenable_builder.dart';
|
import 'package:appflowy/shared/conditional_listenable_builder.dart';
|
||||||
import 'package:appflowy/shared/flowy_error_page.dart';
|
import 'package:appflowy/shared/flowy_error_page.dart';
|
||||||
|
import 'package:appflowy/util/field_type_extension.dart';
|
||||||
|
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
|
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||||
import 'package:appflowy_board/appflowy_board.dart';
|
import 'package:appflowy_board/appflowy_board.dart';
|
||||||
|
@ -27,13 +24,14 @@ import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
||||||
|
import 'package:flutter/material.dart' hide Card;
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:universal_platform/universal_platform.dart';
|
import 'package:universal_platform/universal_platform.dart';
|
||||||
|
|
||||||
import '../../widgets/card/card.dart';
|
import '../../widgets/card/card.dart';
|
||||||
import '../../widgets/cell/card_cell_builder.dart';
|
import '../../widgets/cell/card_cell_builder.dart';
|
||||||
import '../application/board_bloc.dart';
|
import '../application/board_bloc.dart';
|
||||||
|
|
||||||
import 'toolbar/board_setting_bar.dart';
|
import 'toolbar/board_setting_bar.dart';
|
||||||
import 'widgets/board_focus_scope.dart';
|
import 'widgets/board_focus_scope.dart';
|
||||||
import 'widgets/board_hidden_groups.dart';
|
import 'widgets/board_hidden_groups.dart';
|
||||||
|
@ -715,19 +713,19 @@ class _BoardCardState extends State<_BoardCard> {
|
||||||
.isFocused(GroupedRowId(rowId: rowId, groupId: groupId))
|
.isFocused(GroupedRowId(rowId: rowId, groupId: groupId))
|
||||||
? Theme.of(context).colorScheme.primary
|
? Theme.of(context).colorScheme.primary
|
||||||
: Theme.of(context).brightness == Brightness.light
|
: Theme.of(context).brightness == Brightness.light
|
||||||
? const Color(0xFF1F2329).withOpacity(0.12)
|
? const Color(0xFF1F2329).withValues(alpha: 0.12)
|
||||||
: const Color(0xFF59647A),
|
: const Color(0xFF59647A),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
spreadRadius: -2,
|
spreadRadius: -2,
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -256,16 +256,16 @@ class NewEventButton extends StatelessWidget {
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
spreadRadius: -2,
|
spreadRadius: -2,
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
blurRadius: 2,
|
blurRadius: 2,
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
spreadRadius: 2,
|
spreadRadius: 2,
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
blurRadius: 8,
|
blurRadius: 8,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,25 +1,23 @@
|
||||||
import 'package:appflowy/plugins/database/application/row/row_controller.dart';
|
|
||||||
import 'package:appflowy/plugins/database/widgets/row/row_detail.dart';
|
|
||||||
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/mobile/presentation/database/card/card_detail/mobile_card_detail_screen.dart';
|
import 'package:appflowy/mobile/presentation/database/card/card_detail/mobile_card_detail_screen.dart';
|
||||||
import 'package:appflowy/plugins/database/application/database_controller.dart';
|
import 'package:appflowy/plugins/database/application/database_controller.dart';
|
||||||
import 'package:appflowy/plugins/database/application/row/row_cache.dart';
|
import 'package:appflowy/plugins/database/application/row/row_cache.dart';
|
||||||
|
import 'package:appflowy/plugins/database/application/row/row_controller.dart';
|
||||||
import 'package:appflowy/plugins/database/widgets/card/card.dart';
|
import 'package:appflowy/plugins/database/widgets/card/card.dart';
|
||||||
import 'package:appflowy/plugins/database/widgets/cell/card_cell_builder.dart';
|
import 'package:appflowy/plugins/database/widgets/cell/card_cell_builder.dart';
|
||||||
import 'package:appflowy/plugins/database/widgets/cell/card_cell_style_maps/calendar_card_cell_style.dart';
|
import 'package:appflowy/plugins/database/widgets/cell/card_cell_style_maps/calendar_card_cell_style.dart';
|
||||||
|
import 'package:appflowy/plugins/database/widgets/row/row_detail.dart';
|
||||||
import 'package:appflowy/workspace/application/view/view_bloc.dart';
|
import 'package:appflowy/workspace/application/view/view_bloc.dart';
|
||||||
|
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
||||||
import 'package:flowy_infra/size.dart';
|
import 'package:flowy_infra/size.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:universal_platform/universal_platform.dart';
|
import 'package:universal_platform/universal_platform.dart';
|
||||||
|
|
||||||
import '../application/calendar_bloc.dart';
|
import '../application/calendar_bloc.dart';
|
||||||
|
|
||||||
import 'calendar_event_editor.dart';
|
import 'calendar_event_editor.dart';
|
||||||
|
|
||||||
class EventCard extends StatefulWidget {
|
class EventCard extends StatefulWidget {
|
||||||
|
@ -129,16 +127,16 @@ class _EventCardState extends State<EventCard> {
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
spreadRadius: -2,
|
spreadRadius: -2,
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
blurRadius: 2,
|
blurRadius: 2,
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
spreadRadius: 2,
|
spreadRadius: 2,
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
blurRadius: 8,
|
blurRadius: 8,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -98,12 +98,15 @@ class EventEditorControls extends StatelessWidget {
|
||||||
size: const Size.square(16),
|
size: const Size.square(16),
|
||||||
color: Theme.of(context).iconTheme.color,
|
color: Theme.of(context).iconTheme.color,
|
||||||
),
|
),
|
||||||
onPressed: () => context.read<CalendarBloc>().add(
|
onPressed: () {
|
||||||
CalendarEvent.duplicateEvent(
|
context.read<CalendarBloc>().add(
|
||||||
rowController.viewId,
|
CalendarEvent.duplicateEvent(
|
||||||
rowController.rowId,
|
rowController.viewId,
|
||||||
),
|
rowController.rowId,
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
PopoverContainer.of(context).close();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const HSpace(8.0),
|
const HSpace(8.0),
|
||||||
|
@ -126,6 +129,7 @@ class EventEditorControls extends StatelessWidget {
|
||||||
rowController.rowId,
|
rowController.rowId,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
PopoverContainer.of(context).close();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:appflowy/plugins/database/grid/presentation/widgets/toolbar/grid_setting_bar.dart';
|
|
||||||
import 'package:appflowy/plugins/database/tab_bar/desktop/setting_menu.dart';
|
|
||||||
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/plugins/database/application/row/row_service.dart';
|
import 'package:appflowy/plugins/database/application/row/row_service.dart';
|
||||||
import 'package:appflowy/plugins/database/application/tab_bar_bloc.dart';
|
import 'package:appflowy/plugins/database/application/tab_bar_bloc.dart';
|
||||||
import 'package:appflowy/plugins/database/domain/sort_service.dart';
|
import 'package:appflowy/plugins/database/domain/sort_service.dart';
|
||||||
import 'package:appflowy/plugins/database/grid/presentation/widgets/calculations/calculations_row.dart';
|
import 'package:appflowy/plugins/database/grid/presentation/widgets/calculations/calculations_row.dart';
|
||||||
|
import 'package:appflowy/plugins/database/grid/presentation/widgets/toolbar/grid_setting_bar.dart';
|
||||||
|
import 'package:appflowy/plugins/database/tab_bar/desktop/setting_menu.dart';
|
||||||
import 'package:appflowy/plugins/database/widgets/cell/editable_cell_builder.dart';
|
import 'package:appflowy/plugins/database/widgets/cell/editable_cell_builder.dart';
|
||||||
import 'package:appflowy/shared/flowy_error_page.dart';
|
import 'package:appflowy/shared/flowy_error_page.dart';
|
||||||
import 'package:appflowy/workspace/application/action_navigation/action_navigation_bloc.dart';
|
import 'package:appflowy/workspace/application/action_navigation/action_navigation_bloc.dart';
|
||||||
import 'package:appflowy/workspace/application/action_navigation/navigation_action.dart';
|
import 'package:appflowy/workspace/application/action_navigation/navigation_action.dart';
|
||||||
|
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
||||||
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
|
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
|
||||||
import 'package:appflowy_backend/log.dart';
|
import 'package:appflowy_backend/log.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||||
|
@ -21,6 +19,7 @@ import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scrollview.dart';
|
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scrollview.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:linked_scroll_controller/linked_scroll_controller.dart';
|
import 'package:linked_scroll_controller/linked_scroll_controller.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -30,7 +29,6 @@ import '../../application/row/row_controller.dart';
|
||||||
import '../../tab_bar/tab_bar_view.dart';
|
import '../../tab_bar/tab_bar_view.dart';
|
||||||
import '../../widgets/row/row_detail.dart';
|
import '../../widgets/row/row_detail.dart';
|
||||||
import '../application/grid_bloc.dart';
|
import '../application/grid_bloc.dart';
|
||||||
|
|
||||||
import 'grid_scroll.dart';
|
import 'grid_scroll.dart';
|
||||||
import 'layout/layout.dart';
|
import 'layout/layout.dart';
|
||||||
import 'layout/sizes.dart';
|
import 'layout/sizes.dart';
|
||||||
|
@ -474,7 +472,7 @@ class _GridRowsState extends State<_GridRows> {
|
||||||
proxyDecorator: (child, _, __) => Provider.value(
|
proxyDecorator: (child, _, __) => Provider.value(
|
||||||
value: context.read<DatabasePluginWidgetBuilderSize>(),
|
value: context.read<DatabasePluginWidgetBuilderSize>(),
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.white.withOpacity(.1),
|
color: Colors.white.withValues(alpha: .1),
|
||||||
child: Opacity(opacity: .5, child: child),
|
child: Opacity(opacity: .5, child: child),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/plugins/database/grid/application/grid_bloc.dart';
|
import 'package:appflowy/plugins/database/grid/application/grid_bloc.dart';
|
||||||
|
@ -9,6 +7,7 @@ import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/button.dart';
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
class GridAddRowButton extends StatelessWidget {
|
class GridAddRowButton extends StatelessWidget {
|
||||||
|
@ -17,8 +16,8 @@ class GridAddRowButton extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final color = Theme.of(context).brightness == Brightness.light
|
final color = Theme.of(context).brightness == Brightness.light
|
||||||
? const Color(0xFF171717).withOpacity(0.4)
|
? const Color(0xFF171717).withValues(alpha: 0.4)
|
||||||
: const Color(0xFFFFFFFF).withOpacity(0.4);
|
: const Color(0xFFFFFFFF).withValues(alpha: 0.4);
|
||||||
return FlowyButton(
|
return FlowyButton(
|
||||||
radius: BorderRadius.zero,
|
radius: BorderRadius.zero,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
@ -66,8 +65,8 @@ class GridRowLoadMoreButton extends StatelessWidget {
|
||||||
final padding =
|
final padding =
|
||||||
context.read<DatabasePluginWidgetBuilderSize>().horizontalPadding;
|
context.read<DatabasePluginWidgetBuilderSize>().horizontalPadding;
|
||||||
final color = Theme.of(context).brightness == Brightness.light
|
final color = Theme.of(context).brightness == Brightness.light
|
||||||
? const Color(0xFF171717).withOpacity(0.4)
|
? const Color(0xFF171717).withValues(alpha: 0.4)
|
||||||
: const Color(0xFFFFFFFF).withOpacity(0.4);
|
: const Color(0xFFFFFFFF).withValues(alpha: 0.4);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: GridSize.footerContentInsets.copyWith(left: 0) +
|
padding: GridSize.footerContentInsets.copyWith(left: 0) +
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
import 'package:appflowy/shared/icon_emoji_picker/icon_picker.dart';
|
|
||||||
import 'package:appflowy/util/theme_extension.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/plugins/database/application/field/field_cell_bloc.dart';
|
import 'package:appflowy/plugins/database/application/field/field_cell_bloc.dart';
|
||||||
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
|
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
|
||||||
import 'package:appflowy/plugins/database/application/field/field_info.dart';
|
import 'package:appflowy/plugins/database/application/field/field_info.dart';
|
||||||
import 'package:appflowy/plugins/database/widgets/field/field_editor.dart';
|
import 'package:appflowy/plugins/database/widgets/field/field_editor.dart';
|
||||||
|
import 'package:appflowy/shared/icon_emoji_picker/icon_picker.dart';
|
||||||
import 'package:appflowy/util/field_type_extension.dart';
|
import 'package:appflowy/util/field_type_extension.dart';
|
||||||
|
import 'package:appflowy/util/theme_extension.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pb.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
import '../../layout/sizes.dart';
|
import '../../layout/sizes.dart';
|
||||||
|
@ -261,7 +260,7 @@ class FieldIcon extends StatelessWidget {
|
||||||
return svgContent == null
|
return svgContent == null
|
||||||
? FlowySvg(
|
? FlowySvg(
|
||||||
fieldInfo.fieldType.svgData,
|
fieldInfo.fieldType.svgData,
|
||||||
color: color.withOpacity(0.6),
|
color: color.withValues(alpha: 0.6),
|
||||||
size: Size.square(dimension),
|
size: Size.square(dimension),
|
||||||
)
|
)
|
||||||
: SizedBox.square(
|
: SizedBox.square(
|
||||||
|
@ -269,7 +268,7 @@ class FieldIcon extends StatelessWidget {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: FlowySvg.string(
|
child: FlowySvg.string(
|
||||||
svgContent,
|
svgContent,
|
||||||
color: color.withOpacity(0.45),
|
color: color.withValues(alpha: 0.45),
|
||||||
size: Size.square(dimension - 2),
|
size: Size.square(dimension - 2),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
enum AccessoryType {
|
enum AccessoryType {
|
||||||
edit,
|
edit,
|
||||||
|
@ -45,7 +44,7 @@ class CardAccessoryContainer extends StatelessWidget {
|
||||||
width: 1,
|
width: 1,
|
||||||
thickness: 1,
|
thickness: 1,
|
||||||
color: Theme.of(context).brightness == Brightness.light
|
color: Theme.of(context).brightness == Brightness.light
|
||||||
? const Color(0xFF1F2329).withOpacity(0.12)
|
? const Color(0xFF1F2329).withValues(alpha: 0.12)
|
||||||
: const Color(0xff59647a),
|
: const Color(0xff59647a),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -77,19 +76,19 @@ class CardAccessoryContainer extends StatelessWidget {
|
||||||
border: Border.fromBorderSide(
|
border: Border.fromBorderSide(
|
||||||
BorderSide(
|
BorderSide(
|
||||||
color: Theme.of(context).brightness == Brightness.light
|
color: Theme.of(context).brightness == Brightness.light
|
||||||
? const Color(0xFF1F2329).withOpacity(0.12)
|
? const Color(0xFF1F2329).withValues(alpha: 0.12)
|
||||||
: const Color(0xff59647a),
|
: const Color(0xff59647a),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 4,
|
blurRadius: 4,
|
||||||
spreadRadius: -2,
|
spreadRadius: -2,
|
||||||
color: const Color(0xFF1F2329).withOpacity(0.02),
|
color: const Color(0xFF1F2329).withValues(alpha: 0.02),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -202,7 +202,7 @@ class _FilePreviewFeedback extends StatelessWidget {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color(0xFF1F2329).withOpacity(.2),
|
color: const Color(0xFF1F2329).withValues(alpha: .2),
|
||||||
blurRadius: 6,
|
blurRadius: 6,
|
||||||
offset: const Offset(0, 3),
|
offset: const Offset(0, 3),
|
||||||
),
|
),
|
||||||
|
@ -431,7 +431,8 @@ class _FilePreviewRenderState extends State<_FilePreviewRender> {
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
position: DecorationPosition.foreground,
|
position: DecorationPosition.foreground,
|
||||||
decoration: BoxDecoration(color: Colors.black.withOpacity(0.5)),
|
decoration:
|
||||||
|
BoxDecoration(color: Colors.black.withValues(alpha: 0.5)),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -543,7 +544,7 @@ class _FilePreviewRenderState extends State<_FilePreviewRender> {
|
||||||
setState(() => isSelected = true);
|
setState(() => isSelected = true);
|
||||||
controller.show();
|
controller.show();
|
||||||
},
|
},
|
||||||
fillColor: Colors.black.withOpacity(0.4),
|
fillColor: Colors.black.withValues(alpha: 0.4),
|
||||||
width: 18,
|
width: 18,
|
||||||
radius: BorderRadius.circular(4),
|
radius: BorderRadius.circular(4),
|
||||||
icon: const FlowySvg(
|
icon: const FlowySvg(
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/mobile/application/page_style/document_page_style_bloc.dart';
|
import 'package:appflowy/mobile/application/page_style/document_page_style_bloc.dart';
|
||||||
|
@ -31,6 +28,8 @@ import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
import 'package:flowy_infra_ui/widget/rounded_button.dart';
|
import 'package:flowy_infra_ui/widget/rounded_button.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:string_validator/string_validator.dart';
|
import 'package:string_validator/string_validator.dart';
|
||||||
|
@ -278,8 +277,10 @@ class _RowCoverState extends State<RowCover> {
|
||||||
onPressed: () => popoverController.show(),
|
onPressed: () => popoverController.show(),
|
||||||
hoverColor: Theme.of(context).colorScheme.surface,
|
hoverColor: Theme.of(context).colorScheme.surface,
|
||||||
textColor: Theme.of(context).colorScheme.tertiary,
|
textColor: Theme.of(context).colorScheme.tertiary,
|
||||||
fillColor:
|
fillColor: Theme.of(context)
|
||||||
Theme.of(context).colorScheme.surface.withOpacity(0.5),
|
.colorScheme
|
||||||
|
.surface
|
||||||
|
.withValues(alpha: 0.5),
|
||||||
title: LocaleKeys.document_plugins_cover_changeCover.tr(),
|
title: LocaleKeys.document_plugins_cover_changeCover.tr(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library document_plugin;
|
library;
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
|
|
|
@ -399,7 +399,7 @@ class DocumentBloc extends Bloc<DocumentEvent, DocumentState> {
|
||||||
final basicColor = ColorGenerator(id.toString()).toColor();
|
final basicColor = ColorGenerator(id.toString()).toColor();
|
||||||
final metadata = DocumentAwarenessMetadata(
|
final metadata = DocumentAwarenessMetadata(
|
||||||
cursorColor: basicColor.toHexString(),
|
cursorColor: basicColor.toHexString(),
|
||||||
selectionColor: basicColor.withOpacity(0.6).toHexString(),
|
selectionColor: basicColor.withValues(alpha: 0.6).toHexString(),
|
||||||
userName: user.name,
|
userName: user.name,
|
||||||
userAvatar: user.iconUrl,
|
userAvatar: user.iconUrl,
|
||||||
);
|
);
|
||||||
|
@ -422,7 +422,7 @@ class DocumentBloc extends Bloc<DocumentEvent, DocumentState> {
|
||||||
final basicColor = ColorGenerator(id.toString()).toColor();
|
final basicColor = ColorGenerator(id.toString()).toColor();
|
||||||
final metadata = DocumentAwarenessMetadata(
|
final metadata = DocumentAwarenessMetadata(
|
||||||
cursorColor: basicColor.toHexString(),
|
cursorColor: basicColor.toHexString(),
|
||||||
selectionColor: basicColor.withOpacity(0.6).toHexString(),
|
selectionColor: basicColor.withValues(alpha: 0.6).toHexString(),
|
||||||
userName: user.name,
|
userName: user.name,
|
||||||
userAvatar: user.iconUrl,
|
userAvatar: user.iconUrl,
|
||||||
);
|
);
|
||||||
|
|
|
@ -18,7 +18,6 @@ import 'package:appflowy_editor/appflowy_editor.dart'
|
||||||
BulletedListBlockKeys,
|
BulletedListBlockKeys,
|
||||||
blockComponentDelta;
|
blockComponentDelta;
|
||||||
import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart';
|
import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart';
|
||||||
import 'package:collection/collection.dart';
|
|
||||||
import 'package:nanoid/nanoid.dart';
|
import 'package:nanoid/nanoid.dart';
|
||||||
|
|
||||||
class ExternalValues extends NodeExternalValues {
|
class ExternalValues extends NodeExternalValues {
|
||||||
|
@ -105,7 +104,7 @@ extension DocumentDataPBFromTo on DocumentDataPB {
|
||||||
|
|
||||||
final children = <Node>[];
|
final children = <Node>[];
|
||||||
if (childrenIds != null && childrenIds.isNotEmpty) {
|
if (childrenIds != null && childrenIds.isNotEmpty) {
|
||||||
children.addAll(childrenIds.map((e) => buildNode(e)).whereNotNull());
|
children.addAll(childrenIds.map((e) => buildNode(e)).nonNulls);
|
||||||
}
|
}
|
||||||
|
|
||||||
final node = block?.toNode(
|
final node = block?.toNode(
|
||||||
|
|
|
@ -113,7 +113,7 @@ class TransactionAdapter {
|
||||||
) {
|
) {
|
||||||
return transaction.operations
|
return transaction.operations
|
||||||
.map((op) => op.toBlockAction(editorState, documentId))
|
.map((op) => op.toBlockAction(editorState, documentId))
|
||||||
.whereNotNull()
|
.nonNulls
|
||||||
.expand((element) => element)
|
.expand((element) => element)
|
||||||
.toList(growable: false); // avoid lazy evaluation
|
.toList(growable: false); // avoid lazy evaluation
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library document_plugin;
|
library;
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
|
|
|
@ -46,7 +46,7 @@ class CollaboratorAvatarStack extends StatelessWidget {
|
||||||
width: width,
|
width: width,
|
||||||
child: WidgetStack(
|
child: WidgetStack(
|
||||||
positions: settings,
|
positions: settings,
|
||||||
buildInfoWidget: (value) => plusWidgetBuilder(value, border),
|
buildInfoWidget: (value, _) => plusWidgetBuilder(value, border),
|
||||||
stackedWidgets: avatars
|
stackedWidgets: avatars
|
||||||
.map(
|
.map(
|
||||||
(avatar) => CircleAvatar(
|
(avatar) => CircleAvatar(
|
||||||
|
|
|
@ -357,7 +357,7 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
dropTargetStyle: AppFlowyDropTargetStyle(
|
dropTargetStyle: AppFlowyDropTargetStyle(
|
||||||
color: Theme.of(context).colorScheme.primary.withOpacity(0.8),
|
color: Theme.of(context).colorScheme.primary.withValues(alpha: 0.8),
|
||||||
margin: const EdgeInsets.only(left: 44),
|
margin: const EdgeInsets.only(left: 44),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -110,7 +110,6 @@ class MobileBlockActionButtons extends StatelessWidget {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transaction.operations.isNotEmpty) {
|
if (transaction.operations.isNotEmpty) {
|
||||||
|
|
|
@ -106,7 +106,7 @@ class _AlignmentButtonsState extends State<_AlignmentButtons> {
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
useIntrinsicWidth: true,
|
useIntrinsicWidth: true,
|
||||||
text: widget.child,
|
text: widget.child,
|
||||||
hoverColor: Colors.grey.withOpacity(0.3),
|
hoverColor: Colors.grey.withValues(alpha: 0.3),
|
||||||
onTap: () => controller.show(),
|
onTap: () => controller.show(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -167,7 +167,7 @@ class _AlignButton extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return FlowyButton(
|
return FlowyButton(
|
||||||
useIntrinsicWidth: true,
|
useIntrinsicWidth: true,
|
||||||
hoverColor: Colors.grey.withOpacity(0.3),
|
hoverColor: Colors.grey.withValues(alpha: 0.3),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
text: FlowyTooltip(
|
text: FlowyTooltip(
|
||||||
message: tooltips,
|
message: tooltips,
|
||||||
|
|
|
@ -141,7 +141,8 @@ class _FileUploadLocalState extends State<_FileUploadLocal> {
|
||||||
height: 32,
|
height: 32,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
hoverColor: Theme.of(context).colorScheme.primary.withOpacity(0.9),
|
hoverColor:
|
||||||
|
Theme.of(context).colorScheme.primary.withValues(alpha: 0.9),
|
||||||
showDefaultBoxDecorationOnMobile: true,
|
showDefaultBoxDecorationOnMobile: true,
|
||||||
margin: const EdgeInsets.all(5),
|
margin: const EdgeInsets.all(5),
|
||||||
text: FlowyText(
|
text: FlowyText(
|
||||||
|
@ -295,7 +296,7 @@ class _FileUploadNetworkState extends State<_FileUploadNetwork> {
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
hoverColor:
|
hoverColor:
|
||||||
Theme.of(context).colorScheme.primary.withOpacity(0.9),
|
Theme.of(context).colorScheme.primary.withValues(alpha: 0.9),
|
||||||
showDefaultBoxDecorationOnMobile: true,
|
showDefaultBoxDecorationOnMobile: true,
|
||||||
margin: const EdgeInsets.all(5),
|
margin: const EdgeInsets.all(5),
|
||||||
text: FlowyText(
|
text: FlowyText(
|
||||||
|
|
|
@ -138,7 +138,7 @@ class _FileUploadLocalState extends State<_FileUploadLocal> {
|
||||||
radius: Corners.s8Border,
|
radius: Corners.s8Border,
|
||||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
hoverColor:
|
hoverColor:
|
||||||
Theme.of(context).colorScheme.primary.withOpacity(0.9),
|
Theme.of(context).colorScheme.primary.withValues(alpha: 0.9),
|
||||||
margin: const EdgeInsets.all(5),
|
margin: const EdgeInsets.all(5),
|
||||||
text: FlowyText(
|
text: FlowyText(
|
||||||
LocaleKeys.document_plugins_file_uploadMobileGallery.tr(),
|
LocaleKeys.document_plugins_file_uploadMobileGallery.tr(),
|
||||||
|
@ -155,7 +155,7 @@ class _FileUploadLocalState extends State<_FileUploadLocal> {
|
||||||
radius: Corners.s8Border,
|
radius: Corners.s8Border,
|
||||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
hoverColor:
|
hoverColor:
|
||||||
Theme.of(context).colorScheme.primary.withOpacity(0.9),
|
Theme.of(context).colorScheme.primary.withValues(alpha: 0.9),
|
||||||
margin: const EdgeInsets.all(5),
|
margin: const EdgeInsets.all(5),
|
||||||
text: FlowyText(
|
text: FlowyText(
|
||||||
LocaleKeys.document_plugins_file_uploadMobile.tr(),
|
LocaleKeys.document_plugins_file_uploadMobile.tr(),
|
||||||
|
@ -241,7 +241,7 @@ class _FileUploadNetworkState extends State<_FileUploadNetwork> {
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
hoverColor:
|
hoverColor:
|
||||||
Theme.of(context).colorScheme.primary.withOpacity(0.9),
|
Theme.of(context).colorScheme.primary.withValues(alpha: 0.9),
|
||||||
radius: Corners.s8Border,
|
radius: Corners.s8Border,
|
||||||
margin: const EdgeInsets.all(5),
|
margin: const EdgeInsets.all(5),
|
||||||
text: FlowyText(
|
text: FlowyText(
|
||||||
|
|
|
@ -60,7 +60,7 @@ final customizeFontToolbarItem = ToolbarItem(
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
key: kFontFamilyToolbarItemKey,
|
key: kFontFamilyToolbarItemKey,
|
||||||
useIntrinsicWidth: true,
|
useIntrinsicWidth: true,
|
||||||
hoverColor: Colors.grey.withOpacity(0.3),
|
hoverColor: Colors.grey.withValues(alpha: 0.3),
|
||||||
onTap: () => popoverController.show(),
|
onTap: () => popoverController.show(),
|
||||||
text: const FlowySvg(
|
text: const FlowySvg(
|
||||||
FlowySvgs.font_family_s,
|
FlowySvgs.font_family_s,
|
||||||
|
|
|
@ -640,7 +640,7 @@ class DocumentCoverState extends State<DocumentCover> {
|
||||||
fillColor: Theme.of(context)
|
fillColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onSurfaceVariant
|
.onSurfaceVariant
|
||||||
.withOpacity(0.5),
|
.withValues(alpha: 0.5),
|
||||||
height: 32,
|
height: 32,
|
||||||
title: LocaleKeys.document_plugins_cover_changeCover.tr(),
|
title: LocaleKeys.document_plugins_cover_changeCover.tr(),
|
||||||
),
|
),
|
||||||
|
@ -726,8 +726,10 @@ class DocumentCoverState extends State<DocumentCover> {
|
||||||
onPressed: () => popoverController.show(),
|
onPressed: () => popoverController.show(),
|
||||||
hoverColor: Theme.of(context).colorScheme.surface,
|
hoverColor: Theme.of(context).colorScheme.surface,
|
||||||
textColor: Theme.of(context).colorScheme.tertiary,
|
textColor: Theme.of(context).colorScheme.tertiary,
|
||||||
fillColor:
|
fillColor: Theme.of(context)
|
||||||
Theme.of(context).colorScheme.surface.withOpacity(0.5),
|
.colorScheme
|
||||||
|
.surface
|
||||||
|
.withValues(alpha: 0.5),
|
||||||
title: LocaleKeys.document_plugins_cover_changeCover.tr(),
|
title: LocaleKeys.document_plugins_cover_changeCover.tr(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -821,8 +823,8 @@ class DeleteCoverButton extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final fillColor = UniversalPlatform.isDesktopOrWeb
|
final fillColor = UniversalPlatform.isDesktopOrWeb
|
||||||
? Theme.of(context).colorScheme.surface.withOpacity(0.5)
|
? Theme.of(context).colorScheme.surface.withValues(alpha: 0.5)
|
||||||
: Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.5);
|
: Theme.of(context).colorScheme.onSurfaceVariant.withValues(alpha: 0.5);
|
||||||
final svgColor = UniversalPlatform.isDesktopOrWeb
|
final svgColor = UniversalPlatform.isDesktopOrWeb
|
||||||
? Theme.of(context).colorScheme.tertiary
|
? Theme.of(context).colorScheme.tertiary
|
||||||
: Theme.of(context).colorScheme.onPrimary;
|
: Theme.of(context).colorScheme.onPrimary;
|
||||||
|
|
|
@ -38,7 +38,10 @@ class _EmojiIconWidgetState extends State<EmojiIconWidget> {
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: !hover
|
color: !hover
|
||||||
? Theme.of(context).colorScheme.inverseSurface.withOpacity(0.5)
|
? Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.inverseSurface
|
||||||
|
.withValues(alpha: 0.5)
|
||||||
: Colors.transparent,
|
: Colors.transparent,
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
|
@ -144,8 +147,6 @@ class RawEmojiIconWidget extends StatelessWidget {
|
||||||
height: emojiSize,
|
height: emojiSize,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
default:
|
|
||||||
return defaultEmoji;
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Log.error("Display widget error: $e");
|
Log.error("Display widget error: $e");
|
||||||
|
|
|
@ -140,7 +140,7 @@ class HeadingPopup extends StatelessWidget {
|
||||||
},
|
},
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
useIntrinsicWidth: true,
|
useIntrinsicWidth: true,
|
||||||
hoverColor: Colors.grey.withOpacity(0.3),
|
hoverColor: Colors.grey.withValues(alpha: 0.3),
|
||||||
text: child,
|
text: child,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -209,7 +209,7 @@ class HeadingButton extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return FlowyButton(
|
return FlowyButton(
|
||||||
useIntrinsicWidth: true,
|
useIntrinsicWidth: true,
|
||||||
hoverColor: Colors.grey.withOpacity(0.3),
|
hoverColor: Colors.grey.withValues(alpha: 0.3),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
text: FlowyTooltip(
|
text: FlowyTooltip(
|
||||||
message: tooltip,
|
message: tooltip,
|
||||||
|
|
|
@ -60,7 +60,7 @@ class _ImageMenuState extends State<ImageMenu> {
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 5,
|
blurRadius: 5,
|
||||||
spreadRadius: 1,
|
spreadRadius: 1,
|
||||||
color: Colors.black.withOpacity(0.1),
|
color: Colors.black.withValues(alpha: 0.1),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
borderRadius: BorderRadius.circular(4.0),
|
borderRadius: BorderRadius.circular(4.0),
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/plugins/document/application/document_bloc.dart';
|
import 'package:appflowy/plugins/document/application/document_bloc.dart';
|
||||||
|
@ -12,6 +9,7 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/image/mult
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/multi_image_block_component/multi_image_block_component.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/multi_image_block_component/multi_image_block_component.dart';
|
||||||
import 'package:appflowy/shared/appflowy_network_image.dart';
|
import 'package:appflowy/shared/appflowy_network_image.dart';
|
||||||
import 'package:appflowy/shared/patterns/file_type_patterns.dart';
|
import 'package:appflowy/shared/patterns/file_type_patterns.dart';
|
||||||
|
import 'package:appflowy/workspace/application/user/user_workspace_bloc.dart';
|
||||||
import 'package:appflowy/workspace/presentation/widgets/image_viewer/image_provider.dart';
|
import 'package:appflowy/workspace/presentation/widgets/image_viewer/image_provider.dart';
|
||||||
import 'package:appflowy/workspace/presentation/widgets/image_viewer/interactive_image_viewer.dart';
|
import 'package:appflowy/workspace/presentation/widgets/image_viewer/interactive_image_viewer.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-user/user_profile.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-user/user_profile.pb.dart';
|
||||||
|
@ -24,6 +22,7 @@ import 'package:flowy_infra_ui/style_widget/hover.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||||
import 'package:flowy_infra_ui/widget/spacing.dart';
|
import 'package:flowy_infra_ui/widget/spacing.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../image_render.dart';
|
import '../image_render.dart';
|
||||||
|
@ -137,7 +136,8 @@ class _ImageBrowserLayoutState extends State<ImageBrowserLayout> {
|
||||||
),
|
),
|
||||||
DecoratedBox(
|
DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white.withOpacity(0.5),
|
color:
|
||||||
|
Colors.white.withValues(alpha: 0.5),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: FlowyText(
|
child: FlowyText(
|
||||||
|
@ -226,8 +226,9 @@ class _ImageBrowserLayoutState extends State<ImageBrowserLayout> {
|
||||||
? const SizedBox.shrink()
|
? const SizedBox.shrink()
|
||||||
: SizedBox.expand(
|
: SizedBox.expand(
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration:
|
decoration: BoxDecoration(
|
||||||
BoxDecoration(color: Colors.white.withOpacity(0.5)),
|
color: Colors.white.withValues(alpha: 0.5),
|
||||||
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
@ -387,8 +388,8 @@ class _ThumbnailItemState extends State<ThumbnailItem> {
|
||||||
child: FlowyHover(
|
child: FlowyHover(
|
||||||
resetHoverOnRebuild: false,
|
resetHoverOnRebuild: false,
|
||||||
style: HoverStyle(
|
style: HoverStyle(
|
||||||
backgroundColor: Colors.black.withOpacity(0.6),
|
backgroundColor: Colors.black.withValues(alpha: 0.6),
|
||||||
hoverColor: Colors.black.withOpacity(0.9),
|
hoverColor: Colors.black.withValues(alpha: 0.9),
|
||||||
),
|
),
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.all(4),
|
padding: EdgeInsets.all(4),
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/common.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/common.dart';
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/multi_image_block_component/layouts/image_browser_layout.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/multi_image_block_component/layouts/image_browser_layout.dart';
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/multi_image_block_component/layouts/image_grid_layout.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/multi_image_block_component/layouts/image_grid_layout.dart';
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/multi_image_block_component/multi_image_block_component.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/multi_image_block_component/multi_image_block_component.dart';
|
||||||
import 'package:appflowy_editor/appflowy_editor.dart' hide ResizableImage;
|
import 'package:appflowy_editor/appflowy_editor.dart' hide ResizableImage;
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
abstract class ImageBlockMultiLayout extends StatefulWidget {
|
abstract class ImageBlockMultiLayout extends StatefulWidget {
|
||||||
const ImageBlockMultiLayout({
|
const ImageBlockMultiLayout({
|
||||||
|
@ -65,7 +64,6 @@ class ImageLayoutRender extends StatelessWidget {
|
||||||
isLocalMode: isLocalMode,
|
isLocalMode: isLocalMode,
|
||||||
);
|
);
|
||||||
case MultiImageLayout.browser:
|
case MultiImageLayout.browser:
|
||||||
default:
|
|
||||||
return ImageBrowserLayout(
|
return ImageBrowserLayout(
|
||||||
node: node,
|
node: node,
|
||||||
editorState: editorState,
|
editorState: editorState,
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/plugins/document/application/document_bloc.dart';
|
import 'package:appflowy/plugins/document/application/document_bloc.dart';
|
||||||
|
@ -25,6 +22,8 @@ import 'package:flowy_infra/size.dart';
|
||||||
import 'package:flowy_infra/theme_extension.dart';
|
import 'package:flowy_infra/theme_extension.dart';
|
||||||
import 'package:flowy_infra/uuid.dart';
|
import 'package:flowy_infra/uuid.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -103,7 +102,7 @@ class _MultiImageMenuState extends State<MultiImageMenu> {
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 5,
|
blurRadius: 5,
|
||||||
spreadRadius: 1,
|
spreadRadius: 1,
|
||||||
color: Colors.black.withOpacity(0.1),
|
color: Colors.black.withValues(alpha: 0.1),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
borderRadius: BorderRadius.circular(4.0),
|
borderRadius: BorderRadius.circular(4.0),
|
||||||
|
|
|
@ -226,7 +226,7 @@ class _ResizableImageState extends State<ResizableImage> {
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 40,
|
height: 40,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.black.withOpacity(0.5),
|
color: Colors.black.withValues(alpha: 0.5),
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(5.0),
|
Radius.circular(5.0),
|
||||||
),
|
),
|
||||||
|
@ -262,7 +262,7 @@ class _ImageLoadFailedWidget extends StatelessWidget {
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(4.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(4.0)),
|
||||||
border: Border.all(color: Colors.grey.withOpacity(0.6)),
|
border: Border.all(color: Colors.grey.withValues(alpha: 0.6)),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
@ -280,7 +280,7 @@ class _ImageLoadFailedWidget extends StatelessWidget {
|
||||||
FlowyText(
|
FlowyText(
|
||||||
error,
|
error,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
color: Theme.of(context).hintColor.withOpacity(0.6),
|
color: Theme.of(context).hintColor.withValues(alpha: 0.6),
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
),
|
),
|
||||||
|
|
|
@ -57,7 +57,8 @@ class _EmbedImageUrlWidgetState extends State<EmbedImageUrlWidget> {
|
||||||
width: 300,
|
width: 300,
|
||||||
child: FlowyButton(
|
child: FlowyButton(
|
||||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
hoverColor: Theme.of(context).colorScheme.primary.withOpacity(0.9),
|
hoverColor:
|
||||||
|
Theme.of(context).colorScheme.primary.withValues(alpha: 0.9),
|
||||||
showDefaultBoxDecorationOnMobile: true,
|
showDefaultBoxDecorationOnMobile: true,
|
||||||
radius:
|
radius:
|
||||||
UniversalPlatform.isMobile ? BorderRadius.circular(8) : null,
|
UniversalPlatform.isMobile ? BorderRadius.circular(8) : null,
|
||||||
|
|
|
@ -39,7 +39,7 @@ class _LinkPreviewMenuState extends State<LinkPreviewMenu> {
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 5,
|
blurRadius: 5,
|
||||||
spreadRadius: 1,
|
spreadRadius: 1,
|
||||||
color: Colors.black.withOpacity(0.1),
|
color: Colors.black.withValues(alpha: 0.1),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
borderRadius: BorderRadius.circular(4.0),
|
borderRadius: BorderRadius.circular(4.0),
|
||||||
|
|
|
@ -124,8 +124,6 @@ class MentionBlock extends StatelessWidget {
|
||||||
reminderOption: reminderOption ?? ReminderOption.none,
|
reminderOption: reminderOption ?? ReminderOption.none,
|
||||||
includeTime: mention[MentionBlockKeys.includeTime] ?? false,
|
includeTime: mention[MentionBlockKeys.includeTime] ?? false,
|
||||||
);
|
);
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ class _TextColorAndBackgroundColorState
|
||||||
EditorTextColorWidget(
|
EditorTextColorWidget(
|
||||||
selectedColor: selectedTextColor?.tryToColor(),
|
selectedColor: selectedTextColor?.tryToColor(),
|
||||||
onSelectedColor: (textColor) async {
|
onSelectedColor: (textColor) async {
|
||||||
final hex = textColor.alpha == 0 ? null : textColor.toHex();
|
final hex = textColor.a == 0 ? null : textColor.toHex();
|
||||||
final selection = widget.selection;
|
final selection = widget.selection;
|
||||||
if (selection.isCollapsed) {
|
if (selection.isCollapsed) {
|
||||||
widget.editorState.updateToggledStyle(
|
widget.editorState.updateToggledStyle(
|
||||||
|
@ -123,8 +123,7 @@ class _TextColorAndBackgroundColorState
|
||||||
EditorBackgroundColors(
|
EditorBackgroundColors(
|
||||||
selectedColor: selectedBackgroundColor?.tryToColor(),
|
selectedColor: selectedBackgroundColor?.tryToColor(),
|
||||||
onSelectedColor: (backgroundColor) async {
|
onSelectedColor: (backgroundColor) async {
|
||||||
final hex =
|
final hex = backgroundColor.a == 0 ? null : backgroundColor.toHex();
|
||||||
backgroundColor.alpha == 0 ? null : backgroundColor.toHex();
|
|
||||||
final selection = widget.selection;
|
final selection = widget.selection;
|
||||||
if (selection.isCollapsed) {
|
if (selection.isCollapsed) {
|
||||||
widget.editorState.updateToggledStyle(
|
widget.editorState.updateToggledStyle(
|
||||||
|
@ -296,7 +295,7 @@ class _TextColorItem extends StatelessWidget {
|
||||||
child: FlowyText(
|
child: FlowyText(
|
||||||
'A',
|
'A',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
color: color.alpha == 0 ? null : color,
|
color: color.a == 0 ? null : color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -468,7 +468,7 @@ class SimpleTableCellBlockWidgetState extends State<SimpleTableCellBlockWidget>
|
||||||
final isSelectingTable =
|
final isSelectingTable =
|
||||||
simpleTableContext?.isSelectingTable.value ?? false;
|
simpleTableContext?.isSelectingTable.value ?? false;
|
||||||
if (isSelectingTable) {
|
if (isSelectingTable) {
|
||||||
return Theme.of(context).colorScheme.primary.withOpacity(0.1);
|
return Theme.of(context).colorScheme.primary.withValues(alpha: 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
final columnColor = node.buildColumnColor(context);
|
final columnColor = node.buildColumnColor(context);
|
||||||
|
|
|
@ -294,7 +294,7 @@ extension SimpleTableColors on BuildContext {
|
||||||
|
|
||||||
Color get simpleTableDividerColor => Theme.of(this).isLightMode
|
Color get simpleTableDividerColor => Theme.of(this).isLightMode
|
||||||
? const Color(0x141F2329)
|
? const Color(0x141F2329)
|
||||||
: const Color(0xFF23262B).withOpacity(0.5);
|
: const Color(0xFF23262B).withValues(alpha: 0.5);
|
||||||
|
|
||||||
Color get simpleTableMoreActionBackgroundColor => Theme.of(this).isLightMode
|
Color get simpleTableMoreActionBackgroundColor => Theme.of(this).isLightMode
|
||||||
? const Color(0xFFF2F3F5)
|
? const Color(0xFFF2F3F5)
|
||||||
|
|
|
@ -412,7 +412,9 @@ class SimpleTableActionMenu extends StatelessWidget {
|
||||||
editorState.service.keyboardService?.closeKeyboard();
|
editorState.service.keyboardService?.closeKeyboard();
|
||||||
// delay the bottom sheet show to make sure the keyboard is closed
|
// delay the bottom sheet show to make sure the keyboard is closed
|
||||||
Future.delayed(Durations.short3, () {
|
Future.delayed(Durations.short3, () {
|
||||||
_showTableActionBottomSheet(context);
|
if (context.mounted) {
|
||||||
|
_showTableActionBottomSheet(context);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
|
@ -622,7 +622,7 @@ class _SimpleTableHeaderActionButtonState
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
child: CupertinoSwitch(
|
child: CupertinoSwitch(
|
||||||
value: value,
|
value: value,
|
||||||
activeColor: Theme.of(context).colorScheme.primary,
|
activeTrackColor: Theme.of(context).colorScheme.primary,
|
||||||
onChanged: (_) => _toggle(),
|
onChanged: (_) => _toggle(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -264,7 +264,7 @@ class _SimpleTableCellBottomSheetState
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onTextColorSelected(Color color) {
|
void _onTextColorSelected(Color color) {
|
||||||
final hex = color.alpha == 0 ? null : color.toHex();
|
final hex = color.a == 0 ? null : color.toHex();
|
||||||
switch (widget.type) {
|
switch (widget.type) {
|
||||||
case SimpleTableMoreActionType.column:
|
case SimpleTableMoreActionType.column:
|
||||||
widget.editorState.updateColumnTextColor(
|
widget.editorState.updateColumnTextColor(
|
||||||
|
@ -284,7 +284,7 @@ class _SimpleTableCellBottomSheetState
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onCellBackgroundColorSelected(Color color) {
|
void _onCellBackgroundColorSelected(Color color) {
|
||||||
final hex = color.alpha == 0 ? null : color.toHex();
|
final hex = color.a == 0 ? null : color.toHex();
|
||||||
switch (widget.type) {
|
switch (widget.type) {
|
||||||
case SimpleTableMoreActionType.column:
|
case SimpleTableMoreActionType.column:
|
||||||
widget.editorState.updateColumnBackgroundColor(
|
widget.editorState.updateColumnBackgroundColor(
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/mobile/application/mobile_router.dart';
|
import 'package:appflowy/mobile/application/mobile_router.dart';
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/block_transaction_handler/block_transaction_handler.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/block_transaction_handler/block_transaction_handler.dart';
|
||||||
|
@ -14,6 +12,7 @@ import 'package:appflowy_backend/protobuf/flowy-folder/view.pbenum.dart';
|
||||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/snap_bar.dart';
|
import 'package:flowy_infra_ui/style_widget/snap_bar.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:universal_platform/universal_platform.dart';
|
import 'package:universal_platform/universal_platform.dart';
|
||||||
|
|
||||||
class SubPageBlockTransactionHandler extends BlockTransactionHandler {
|
class SubPageBlockTransactionHandler extends BlockTransactionHandler {
|
||||||
|
@ -162,7 +161,9 @@ class SubPageBlockTransactionHandler extends BlockTransactionHandler {
|
||||||
if (UniversalPlatform.isDesktop) {
|
if (UniversalPlatform.isDesktop) {
|
||||||
getIt<TabsBloc>().openPlugin(view);
|
getIt<TabsBloc>().openPlugin(view);
|
||||||
} else {
|
} else {
|
||||||
await context.pushView(view);
|
if (context.mounted) {
|
||||||
|
await context.pushView(view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -111,7 +111,8 @@ class EditorStyleCustomizer {
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
backgroundColor: theme.colorScheme.inverseSurface.withOpacity(0.8),
|
backgroundColor:
|
||||||
|
theme.colorScheme.inverseSurface.withValues(alpha: 0.8),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -159,7 +160,7 @@ class EditorStyleCustomizer {
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
backgroundColor: Colors.grey.withOpacity(0.3),
|
backgroundColor: Colors.grey.withValues(alpha: 0.3),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
applyHeightToFirstAscent: true,
|
applyHeightToFirstAscent: true,
|
||||||
|
@ -241,7 +242,7 @@ class EditorStyleCustomizer {
|
||||||
fontFamily: defaultFontFamily,
|
fontFamily: defaultFontFamily,
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
height: 1.5,
|
height: 1.5,
|
||||||
color: AFThemeExtension.of(context).onBackground.withOpacity(0.6),
|
color: AFThemeExtension.of(context).onBackground.withValues(alpha: 0.6),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +282,7 @@ class EditorStyleCustomizer {
|
||||||
final afThemeExtension = AFThemeExtension.of(context);
|
final afThemeExtension = AFThemeExtension.of(context);
|
||||||
return InlineActionsMenuStyle(
|
return InlineActionsMenuStyle(
|
||||||
backgroundColor: theme.cardColor,
|
backgroundColor: theme.cardColor,
|
||||||
groupTextColor: afThemeExtension.onBackground.withOpacity(.8),
|
groupTextColor: afThemeExtension.onBackground.withValues(alpha: .8),
|
||||||
menuItemTextColor: afThemeExtension.onBackground,
|
menuItemTextColor: afThemeExtension.onBackground,
|
||||||
menuItemSelectedColor: theme.colorScheme.secondary,
|
menuItemSelectedColor: theme.colorScheme.secondary,
|
||||||
menuItemSelectedTextColor: theme.colorScheme.onSurface,
|
menuItemSelectedTextColor: theme.colorScheme.onSurface,
|
||||||
|
@ -470,7 +471,7 @@ class EditorStyleCustomizer {
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||||
child: FlowyHover(
|
child: FlowyHover(
|
||||||
style: HoverStyle(
|
style: HoverStyle(
|
||||||
hoverColor: Colors.grey.withOpacity(0.3),
|
hoverColor: Colors.grey.withValues(alpha: 0.3),
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
|
|
|
@ -165,7 +165,7 @@ class _InlineActionsHandlerState extends State<InlineActionsHandler> {
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 5,
|
blurRadius: 5,
|
||||||
spreadRadius: 1,
|
spreadRadius: 1,
|
||||||
color: Colors.black.withOpacity(0.1),
|
color: Colors.black.withValues(alpha: 0.1),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -198,7 +198,7 @@ class _ExportButton extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final color = Theme.of(context).isLightMode
|
final color = Theme.of(context).isLightMode
|
||||||
? const Color(0x1E14171B)
|
? const Color(0x1E14171B)
|
||||||
: Colors.white.withOpacity(0.1);
|
: Colors.white.withValues(alpha: 0.1);
|
||||||
final radius = BorderRadius.circular(10.0);
|
final radius = BorderRadius.circular(10.0);
|
||||||
return FlowyButton(
|
return FlowyButton(
|
||||||
margin: const EdgeInsets.symmetric(vertical: 10, horizontal: 14),
|
margin: const EdgeInsets.symmetric(vertical: 10, horizontal: 14),
|
||||||
|
|
|
@ -5,7 +5,7 @@ class ShareMenuColors {
|
||||||
static Color borderColor(BuildContext context) {
|
static Color borderColor(BuildContext context) {
|
||||||
final borderColor = Theme.of(context).isLightMode
|
final borderColor = Theme.of(context).isLightMode
|
||||||
? const Color(0x1E14171B)
|
? const Color(0x1E14171B)
|
||||||
: Colors.white.withOpacity(0.1);
|
: Colors.white.withValues(alpha: 0.1);
|
||||||
return borderColor;
|
return borderColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ class _PublishedWidgetState extends State<_PublishedWidget> {
|
||||||
title: LocaleKeys.shareAction_visitSite.tr(),
|
title: LocaleKeys.shareAction_visitSite.tr(),
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
||||||
fillColor: Theme.of(context).colorScheme.primary,
|
fillColor: Theme.of(context).colorScheme.primary,
|
||||||
hoverColor: Theme.of(context).colorScheme.primary.withOpacity(0.9),
|
hoverColor: Theme.of(context).colorScheme.primary.withValues(alpha: 0.9),
|
||||||
textColor: Theme.of(context).colorScheme.onPrimary,
|
textColor: Theme.of(context).colorScheme.onPrimary,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -508,7 +508,7 @@ class _PublishDatabaseSelector extends StatefulWidget {
|
||||||
class _PublishDatabaseSelectorState extends State<_PublishDatabaseSelector> {
|
class _PublishDatabaseSelectorState extends State<_PublishDatabaseSelector> {
|
||||||
final PropertyValueNotifier<List<(ViewPB, bool)>> _databaseStatus =
|
final PropertyValueNotifier<List<(ViewPB, bool)>> _databaseStatus =
|
||||||
PropertyValueNotifier<List<(ViewPB, bool)>>([]);
|
PropertyValueNotifier<List<(ViewPB, bool)>>([]);
|
||||||
late final _borderColor = Theme.of(context).hintColor.withOpacity(0.3);
|
late final _borderColor = Theme.of(context).hintColor.withValues(alpha: 0.3);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ extension PickerColors on BuildContext {
|
||||||
Color get pickerTextColor {
|
Color get pickerTextColor {
|
||||||
return Theme.of(this).isLightMode
|
return Theme.of(this).isLightMode
|
||||||
? const Color(0x80171717)
|
? const Color(0x80171717)
|
||||||
: Colors.white.withOpacity(0.5);
|
: Colors.white.withValues(alpha: 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
Color get pickerIconColor {
|
Color get pickerIconColor {
|
||||||
|
@ -15,12 +15,12 @@ extension PickerColors on BuildContext {
|
||||||
Color get pickerSearchBarBorderColor {
|
Color get pickerSearchBarBorderColor {
|
||||||
return Theme.of(this).isLightMode
|
return Theme.of(this).isLightMode
|
||||||
? const Color(0x1E171717)
|
? const Color(0x1E171717)
|
||||||
: Colors.white.withOpacity(0.12);
|
: Colors.white.withValues(alpha: 0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
Color get pickerButtonBoarderColor {
|
Color get pickerButtonBoarderColor {
|
||||||
return Theme.of(this).isLightMode
|
return Theme.of(this).isLightMode
|
||||||
? const Color(0x1E171717)
|
? const Color(0x1E171717)
|
||||||
: Colors.white.withOpacity(0.12);
|
: Colors.white.withValues(alpha: 0.12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1613,7 +1613,7 @@ class _PopupMenuDefaultsM3 extends PopupMenuThemeData {
|
||||||
return WidgetStateProperty.resolveWith((Set<WidgetState> states) {
|
return WidgetStateProperty.resolveWith((Set<WidgetState> states) {
|
||||||
final TextStyle style = _textTheme.labelLarge!;
|
final TextStyle style = _textTheme.labelLarge!;
|
||||||
if (states.contains(WidgetState.disabled)) {
|
if (states.contains(WidgetState.disabled)) {
|
||||||
return style.apply(color: _colors.onSurface.withOpacity(0.38));
|
return style.apply(color: _colors.onSurface.withValues(alpha: 0.38));
|
||||||
}
|
}
|
||||||
return style.apply(color: _colors.onSurface);
|
return style.apply(color: _colors.onSurface);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library flowy_plugin;
|
library;
|
||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/startup/plugin/plugin.dart';
|
import 'package:appflowy/startup/plugin/plugin.dart';
|
||||||
|
|
|
@ -5,12 +5,17 @@ import 'package:flutter/material.dart';
|
||||||
extension ColorExtension on Color {
|
extension ColorExtension on Color {
|
||||||
/// return a hex string in 0xff000000 format
|
/// return a hex string in 0xff000000 format
|
||||||
String toHexString() {
|
String toHexString() {
|
||||||
return '0x${value.toRadixString(16).padLeft(8, '0')}';
|
final alpha = (a * 255).toInt().toRadixString(16).padLeft(2, '0');
|
||||||
|
final red = (r * 255).toInt().toRadixString(16).padLeft(2, '0');
|
||||||
|
final green = (g * 255).toInt().toRadixString(16).padLeft(2, '0');
|
||||||
|
final blue = (b * 255).toInt().toRadixString(16).padLeft(2, '0');
|
||||||
|
|
||||||
|
return '0x$alpha$red$green$blue'.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// return a random color
|
/// return a random color
|
||||||
static Color random({double opacity = 1.0}) {
|
static Color random({double opacity = 1.0}) {
|
||||||
return Color((math.Random().nextDouble() * 0xFFFFFF).toInt())
|
return Color((math.Random().nextDouble() * 0xFFFFFF).toInt())
|
||||||
.withOpacity(opacity);
|
.withValues(alpha: opacity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:appflowy/workspace/application/settings/appearance/base_appearance.dart';
|
import 'package:appflowy/workspace/application/settings/appearance/base_appearance.dart';
|
||||||
import 'package:flowy_infra/theme.dart';
|
import 'package:flowy_infra/theme.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
/// A class for the default appearance settings for the app
|
/// A class for the default appearance settings for the app
|
||||||
class DefaultAppearanceSettings {
|
class DefaultAppearanceSettings {
|
||||||
|
@ -15,6 +14,6 @@ class DefaultAppearanceSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Color getDefaultSelectionColor(BuildContext context) {
|
static Color getDefaultSelectionColor(BuildContext context) {
|
||||||
return Theme.of(context).colorScheme.primary.withOpacity(0.2);
|
return Theme.of(context).colorScheme.primary.withValues(alpha: 0.2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,7 +309,6 @@ ThemeModePB _themeModeToPB(ThemeMode themeMode) {
|
||||||
case ThemeMode.dark:
|
case ThemeMode.dark:
|
||||||
return ThemeModePB.Dark;
|
return ThemeModePB.Dark;
|
||||||
case ThemeMode.system:
|
case ThemeMode.system:
|
||||||
default:
|
|
||||||
return ThemeModePB.System;
|
return ThemeModePB.System;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -358,8 +357,6 @@ enum AppFlowyTextDirection {
|
||||||
return TextDirectionPB.RTL;
|
return TextDirectionPB.RTL;
|
||||||
case AppFlowyTextDirection.auto:
|
case AppFlowyTextDirection.auto:
|
||||||
return TextDirectionPB.AUTO;
|
return TextDirectionPB.AUTO;
|
||||||
default:
|
|
||||||
return TextDirectionPB.FALLBACK;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ class MobileAppearance extends BaseAppearance {
|
||||||
error: const Color(0xffFB006D),
|
error: const Color(0xffFB006D),
|
||||||
onError: const Color(0xffFB006D),
|
onError: const Color(0xffFB006D),
|
||||||
outline: const Color(0xffe3e3e3),
|
outline: const Color(0xffe3e3e3),
|
||||||
outlineVariant: const Color(0xffCBD5E0).withOpacity(0.24),
|
outlineVariant: const Color(0xffCBD5E0).withValues(alpha: 0.24),
|
||||||
//Snack bar
|
//Snack bar
|
||||||
surface: Colors.white,
|
surface: Colors.white,
|
||||||
onSurface: _onSurfaceColor, // text/body color
|
onSurface: _onSurfaceColor, // text/body color
|
||||||
|
|
|
@ -53,8 +53,8 @@ class SettingsShortcutService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Extracts shortcuts from the saved json file. The shortcuts in the saved file consist of [List<CommandShortcutModel>].
|
// Extracts shortcuts from the saved json file. The shortcuts in the saved file consist of [List<CommandShortcutModel>].
|
||||||
/// This list needs to be converted to List<CommandShortcutEvent\>. This function is intended to facilitate the same.
|
// This list needs to be converted to List<CommandShortcutEvent\>. This function is intended to facilitate the same.
|
||||||
List<CommandShortcutModel> getShortcutsFromJson(String savedJson) {
|
List<CommandShortcutModel> getShortcutsFromJson(String savedJson) {
|
||||||
final shortcuts = EditorShortcuts.fromJson(jsonDecode(savedJson));
|
final shortcuts = EditorShortcuts.fromJson(jsonDecode(savedJson));
|
||||||
return shortcuts.commandShortcuts;
|
return shortcuts.commandShortcuts;
|
||||||
|
|
|
@ -33,8 +33,8 @@ class RecentViewTile extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
focusColor: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
focusColor: Theme.of(context).colorScheme.primary.withValues(alpha: 0.1),
|
||||||
hoverColor: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
hoverColor: Theme.of(context).colorScheme.primary.withValues(alpha: 0.1),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
onSelected();
|
onSelected();
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,8 @@ class _SearchResultTileState extends State<SearchResultTile> {
|
||||||
child: FlowyHover(
|
child: FlowyHover(
|
||||||
isSelected: () => _hasFocus,
|
isSelected: () => _hasFocus,
|
||||||
style: HoverStyle(
|
style: HoverStyle(
|
||||||
hoverColor: Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
hoverColor:
|
||||||
|
Theme.of(context).colorScheme.primary.withValues(alpha: 0.1),
|
||||||
foregroundColorOnHover: AFThemeExtension.of(context).textColor,
|
foregroundColorOnHover: AFThemeExtension.of(context).textColor,
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
|
@ -326,7 +326,7 @@ class _SecondaryViewState extends State<SecondaryView>
|
||||||
? const Color(0x1F1F2329)
|
? const Color(0x1F1F2329)
|
||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.shadowColor
|
.shadowColor
|
||||||
.withOpacity(0.08),
|
.withValues(alpha: 0.08),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -174,8 +174,8 @@ class _PlanIndicatorState extends State<PlanIndicator> {
|
||||||
begin: Alignment.topLeft,
|
begin: Alignment.topLeft,
|
||||||
end: Alignment.bottomRight,
|
end: Alignment.bottomRight,
|
||||||
colors: [
|
colors: [
|
||||||
const Color(0xFF8032FF).withOpacity(.1),
|
const Color(0xFF8032FF).withValues(alpha: .1),
|
||||||
const Color(0xFFEF35FF).withOpacity(.1),
|
const Color(0xFFEF35FF).withValues(alpha: .1),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -204,8 +204,6 @@ class _ImportPanelState extends State<ImportPanel> {
|
||||||
..importType = ImportTypePB.AFDatabase,
|
..importType = ImportTypePB.AFDatabase,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,16 +250,16 @@ enum ConfirmPopupStyle {
|
||||||
class ConfirmPopupColor {
|
class ConfirmPopupColor {
|
||||||
static Color titleColor(BuildContext context) {
|
static Color titleColor(BuildContext context) {
|
||||||
if (Theme.of(context).isLightMode) {
|
if (Theme.of(context).isLightMode) {
|
||||||
return const Color(0xFF171717).withOpacity(0.8);
|
return const Color(0xFF171717).withValues(alpha: 0.8);
|
||||||
}
|
}
|
||||||
return const Color(0xFFffffff).withOpacity(0.8);
|
return const Color(0xFFffffff).withValues(alpha: 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Color descriptionColor(BuildContext context) {
|
static Color descriptionColor(BuildContext context) {
|
||||||
if (Theme.of(context).isLightMode) {
|
if (Theme.of(context).isLightMode) {
|
||||||
return const Color(0xFF171717).withOpacity(0.7);
|
return const Color(0xFF171717).withValues(alpha: 0.7);
|
||||||
}
|
}
|
||||||
return const Color(0xFFffffff).withOpacity(0.7);
|
return const Color(0xFFffffff).withValues(alpha: 0.7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,7 @@ class _CreateWorkspaceButton extends StatelessWidget {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: const Color(0x01717171).withOpacity(0.12),
|
color: const Color(0x01717171).withValues(alpha: 0.12),
|
||||||
width: 0.8,
|
width: 0.8,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -438,7 +438,7 @@ class _ImportNotionButton extends StatelessWidget {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: const Color(0x01717171).withOpacity(0.12),
|
color: const Color(0x01717171).withValues(alpha: 0.12),
|
||||||
width: 0.8,
|
width: 0.8,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -111,7 +111,8 @@ class _DraggableViewItemState extends State<DraggableViewItem> {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(6.0),
|
borderRadius: BorderRadius.circular(6.0),
|
||||||
color: position == DraggableHoverPosition.center
|
color: position == DraggableHoverPosition.center
|
||||||
? widget.centerHighlightColor ?? hoverColor.withOpacity(0.5)
|
? widget.centerHighlightColor ??
|
||||||
|
hoverColor.withValues(alpha: 0.5)
|
||||||
: Colors.transparent,
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
|
@ -150,7 +151,10 @@ class _DraggableViewItemState extends State<DraggableViewItem> {
|
||||||
borderRadius: BorderRadius.circular(4.0),
|
borderRadius: BorderRadius.circular(4.0),
|
||||||
color: position == DraggableHoverPosition.center
|
color: position == DraggableHoverPosition.center
|
||||||
? widget.centerHighlightColor ??
|
? widget.centerHighlightColor ??
|
||||||
Theme.of(context).colorScheme.secondary.withOpacity(0.5)
|
Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.secondary
|
||||||
|
.withValues(alpha: 0.5)
|
||||||
: Colors.transparent,
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
|
|
|
@ -76,7 +76,8 @@ class _AccountDeletionButtonState extends State<AccountDeletionButton> {
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 26, vertical: 10),
|
padding: const EdgeInsets.symmetric(horizontal: 26, vertical: 10),
|
||||||
fillColor: Colors.transparent,
|
fillColor: Colors.transparent,
|
||||||
radius: Corners.s8Border,
|
radius: Corners.s8Border,
|
||||||
hoverColor: Theme.of(context).colorScheme.error.withOpacity(0.1),
|
hoverColor:
|
||||||
|
Theme.of(context).colorScheme.error.withValues(alpha: 0.1),
|
||||||
fontColor: Theme.of(context).colorScheme.error,
|
fontColor: Theme.of(context).colorScheme.error,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
isDangerous: true,
|
isDangerous: true,
|
||||||
|
|
|
@ -602,8 +602,8 @@ class _PlanProgressIndicator extends StatelessWidget {
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
color: AFThemeExtension.of(context).progressBarBGColor,
|
color: AFThemeExtension.of(context).progressBarBGColor,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: const Color(0xFFDDF1F7).withOpacity(
|
color: const Color(0xFFDDF1F7).withValues(
|
||||||
theme.brightness == Brightness.light ? 1 : 0.1,
|
alpha: theme.brightness == Brightness.light ? 1 : 0.1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -673,7 +673,7 @@ class _AddOnBox extends StatelessWidget {
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: isActive ? const Color(0xFFBDBDBD) : const Color(0xFF9C00FB),
|
color: isActive ? const Color(0xFFBDBDBD) : const Color(0xFF9C00FB),
|
||||||
),
|
),
|
||||||
color: const Color(0xFFF7F8FC).withOpacity(0.05),
|
color: const Color(0xFFF7F8FC).withValues(alpha: 0.05),
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
|
@ -485,7 +485,7 @@ class KeyBadge extends StatelessWidget {
|
||||||
borderRadius: Corners.s4Border,
|
borderRadius: Corners.s4Border,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.25),
|
color: Colors.black.withValues(alpha: 0.25),
|
||||||
blurRadius: 1,
|
blurRadius: 1,
|
||||||
offset: const Offset(0, 1),
|
offset: const Offset(0, 1),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1090,9 +1090,11 @@ class _FontListPopupState extends State<_FontListPopup> {
|
||||||
hoverColor: Theme.of(context)
|
hoverColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onSurface
|
.onSurface
|
||||||
.withOpacity(0.12),
|
.withValues(alpha: 0.12),
|
||||||
selectedTileColor:
|
selectedTileColor: Theme.of(context)
|
||||||
Theme.of(context).colorScheme.primary.withOpacity(0.12),
|
.colorScheme
|
||||||
|
.primary
|
||||||
|
.withValues(alpha: 0.12),
|
||||||
contentPadding:
|
contentPadding:
|
||||||
const EdgeInsets.symmetric(horizontal: 6, vertical: 4),
|
const EdgeInsets.symmetric(horizontal: 6, vertical: 4),
|
||||||
minTileHeight: 0,
|
minTileHeight: 0,
|
||||||
|
|
|
@ -249,7 +249,7 @@ class _FreePlanUpgradeButton extends StatelessWidget {
|
||||||
horizontal: 8.0,
|
horizontal: 8.0,
|
||||||
vertical: 6.0,
|
vertical: 6.0,
|
||||||
),
|
),
|
||||||
hoverColor: context.proSecondaryColor.withOpacity(0.9),
|
hoverColor: context.proSecondaryColor.withValues(alpha: 0.9),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (isOwner) {
|
if (isOwner) {
|
||||||
showToastNotification(
|
showToastNotification(
|
||||||
|
|
|
@ -171,8 +171,6 @@ class SettingsDialog extends StatelessWidget {
|
||||||
);
|
);
|
||||||
case SettingsPage.featureFlags:
|
case SettingsPage.featureFlags:
|
||||||
return const FeatureFlagsPage();
|
return const FeatureFlagsPage();
|
||||||
default:
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue