mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: upgrade flutter to 3.13.9 (#3936)
This commit is contained in:
parent
1c500fbfc5
commit
6a9866b9d2
2
.github/workflows/flutter_ci.yaml
vendored
2
.github/workflows/flutter_ci.yaml
vendored
@ -23,7 +23,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
FLUTTER_VERSION: "3.10.4"
|
FLUTTER_VERSION: "3.13.9"
|
||||||
RUST_TOOLCHAIN: "1.70"
|
RUST_TOOLCHAIN: "1.70"
|
||||||
CARGO_MAKE_VERSION: "0.36.6"
|
CARGO_MAKE_VERSION: "0.36.6"
|
||||||
|
|
||||||
|
2
.github/workflows/mobile_ci.yaml
vendored
2
.github/workflows/mobile_ci.yaml
vendored
@ -18,7 +18,7 @@ on:
|
|||||||
- "!frontend/appflowy_tauri/**"
|
- "!frontend/appflowy_tauri/**"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FLUTTER_VERSION: "3.10.1"
|
FLUTTER_VERSION: "3.13.9"
|
||||||
RUST_TOOLCHAIN: "1.70"
|
RUST_TOOLCHAIN: "1.70"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -6,7 +6,7 @@ on:
|
|||||||
- "*"
|
- "*"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FLUTTER_VERSION: "3.10.1"
|
FLUTTER_VERSION: "3.13.9"
|
||||||
RUST_TOOLCHAIN: "1.70"
|
RUST_TOOLCHAIN: "1.70"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
2
.github/workflows/rust_coverage.yml
vendored
2
.github/workflows/rust_coverage.yml
vendored
@ -11,7 +11,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
FLUTTER_VERSION: "3.10.1"
|
FLUTTER_VERSION: "3.13.9"
|
||||||
RUST_TOOLCHAIN: "1.70"
|
RUST_TOOLCHAIN: "1.70"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<h1 align="center" style="margin:0"> AppFlowy_Flutter</h1>
|
<h1 align="center" style="margin:0"> AppFlowy_Flutter</h1>
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://img.shields.io/badge/Flutter-v3.10.1-blue"/>
|
<img src="https://img.shields.io/badge/Flutter-v3.13.19-blue"/>
|
||||||
<img src="https://img.shields.io/badge/Rust-v1.65-orange"/>
|
<img src="https://img.shields.io/badge/Rust-v1.70-orange"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
> Documentation for Contributors
|
> Documentation for Contributors
|
||||||
|
@ -34,7 +34,7 @@ void main() {
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false
|
false,
|
||||||
];
|
];
|
||||||
for (final (index, content) in checkboxCells.indexed) {
|
for (final (index, content) in checkboxCells.indexed) {
|
||||||
await tester.assertCheckboxCell(
|
await tester.assertCheckboxCell(
|
||||||
@ -54,7 +54,7 @@ void main() {
|
|||||||
'10',
|
'10',
|
||||||
'11',
|
'11',
|
||||||
'12',
|
'12',
|
||||||
''
|
'',
|
||||||
];
|
];
|
||||||
for (final (index, content) in numberCells.indexed) {
|
for (final (index, content) in numberCells.indexed) {
|
||||||
await tester.assertCellContent(
|
await tester.assertCellContent(
|
||||||
@ -152,7 +152,7 @@ void main() {
|
|||||||
'Jun 16, 2023',
|
'Jun 16, 2023',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
''
|
'',
|
||||||
];
|
];
|
||||||
for (final (index, content) in dateCells.indexed) {
|
for (final (index, content) in dateCells.indexed) {
|
||||||
await tester.assertDateCellInGrid(
|
await tester.assertDateCellInGrid(
|
||||||
|
@ -219,7 +219,7 @@ void main() {
|
|||||||
expect(node.delta!.toJson(), [
|
expect(node.delta!.toJson(), [
|
||||||
{
|
{
|
||||||
'insert': text,
|
'insert': text,
|
||||||
'attributes': {'href': url}
|
'attributes': {'href': url},
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
@ -2,8 +2,8 @@ import 'package:appflowy/generated/locale_keys.g.dart';
|
|||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/header/document_header_node_widget.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/header/document_header_node_widget.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:emoji_mart/emoji_mart.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:integration_test/integration_test.dart';
|
import 'package:integration_test/integration_test.dart';
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/header/emo
|
|||||||
import 'package:appflowy/plugins/inline_actions/widgets/inline_actions_handler.dart';
|
import 'package:appflowy/plugins/inline_actions/widgets/inline_actions_handler.dart';
|
||||||
import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
|
import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:emoji_mart/emoji_mart.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
import 'util.dart';
|
import 'util.dart';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import 'package:emoji_mart/emoji_mart.dart';
|
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
import 'base.dart';
|
import 'base.dart';
|
||||||
|
@ -15,7 +15,7 @@ class MyMockClient extends Mock implements http.Client {
|
|||||||
if (requestType == 'POST' &&
|
if (requestType == 'POST' &&
|
||||||
requestUri == OpenAIRequestType.textCompletion.uri) {
|
requestUri == OpenAIRequestType.textCompletion.uri) {
|
||||||
final responseHeaders = <String, String>{
|
final responseHeaders = <String, String>{
|
||||||
'content-type': 'text/event-stream'
|
'content-type': 'text/event-stream',
|
||||||
};
|
};
|
||||||
final responseBody = Stream.fromIterable([
|
final responseBody = Stream.fromIterable([
|
||||||
utf8.encode(
|
utf8.encode(
|
||||||
|
@ -171,7 +171,7 @@ SPEC CHECKSUMS:
|
|||||||
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
|
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
|
||||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
||||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
|
||||||
flowy_infra_ui: 0455e1fa8c51885aa1437848e361e99419f34ebc
|
flowy_infra_ui: 0455e1fa8c51885aa1437848e361e99419f34ebc
|
||||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||||
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
|
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1300;
|
LastUpgradeCheck = 1430;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1300"
|
LastUpgradeVersion = "1430"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
@ -98,7 +98,7 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
|||||||
? MobileViewItemBottomSheetBodyAction.removeFromFavorites
|
? MobileViewItemBottomSheetBodyAction.removeFromFavorites
|
||||||
: MobileViewItemBottomSheetBodyAction.addToFavorites,
|
: MobileViewItemBottomSheetBodyAction.addToFavorites,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class MobileViewItemBottomSheetHeader extends StatelessWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ class DetailsPlaceholderScreenState extends State<DetailsPlaceholderScreen> {
|
|||||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -34,7 +34,7 @@ class MobileFavoritePageFolder extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
BlocProvider(
|
BlocProvider(
|
||||||
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
child: MultiBlocListener(
|
child: MultiBlocListener(
|
||||||
listeners: [
|
listeners: [
|
||||||
|
@ -34,7 +34,7 @@ class MobileFolders extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
BlocProvider(
|
BlocProvider(
|
||||||
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
child: MultiBlocListener(
|
child: MultiBlocListener(
|
||||||
listeners: [
|
listeners: [
|
||||||
|
@ -66,7 +66,7 @@ class MobileHomePageHeader extends StatelessWidget {
|
|||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.arrow_drop_down,
|
Icons.arrow_drop_down,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
FlowyText.regular(
|
FlowyText.regular(
|
||||||
@ -76,7 +76,7 @@ class MobileHomePageHeader extends StatelessWidget {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: theme.colorScheme.onSurface,
|
color: theme.colorScheme.onSurface,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -87,7 +87,7 @@ class MobileHomePageHeader extends StatelessWidget {
|
|||||||
icon: const FlowySvg(
|
icon: const FlowySvg(
|
||||||
FlowySvgs.m_setting_m,
|
FlowySvgs.m_setting_m,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -51,7 +51,7 @@ class MobileHomeTrashPage extends StatelessWidget {
|
|||||||
trashBloc: trashBloc,
|
trashBloc: trashBloc,
|
||||||
type: _TrashActionType.restoreAll,
|
type: _TrashActionType.restoreAll,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -214,7 +214,7 @@ class _DeletedFilesListView extends StatelessWidget {
|
|||||||
gravity: ToastGravity.BOTTOM,
|
gravity: ToastGravity.BOTTOM,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -64,7 +64,7 @@ class MobilePersonalFolder extends StatelessWidget {
|
|||||||
MobilePaneActionType.more,
|
MobilePaneActionType.more,
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -48,7 +48,7 @@ class _MobileRecentFolderState extends State<MobileRecentFolder> {
|
|||||||
// the recent views are in reverse order
|
// the recent views are in reverse order
|
||||||
recentViews: recentViews,
|
recentViews: recentViews,
|
||||||
),
|
),
|
||||||
const VSpace(12.0)
|
const VSpace(12.0),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -312,7 +312,7 @@ class _SingleMobileInnerViewItemState extends State<SingleMobileInnerViewItem> {
|
|||||||
fontSize: 18.0,
|
fontSize: 18.0,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
// hover action
|
// hover action
|
||||||
|
@ -40,7 +40,7 @@ class _AppearanceSettingGroupState extends State<AppearanceSettingGroup> {
|
|||||||
color: theme.colorScheme.onSurface,
|
color: theme.colorScheme.onSurface,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Icon(Icons.chevron_right)
|
const Icon(Icons.chevron_right),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -71,7 +71,7 @@ class _EditUsernameBottomSheetState extends State<EditUsernameBottomSheet> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
widget.context.pop();
|
widget.context.pop();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
|
@ -62,7 +62,7 @@ class PersonalInfoSettingGroup extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -92,8 +92,8 @@ class FlowyMobileStateContainer extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -48,7 +48,7 @@ class _BottomSheetTitle extends StatelessWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import 'package:appflowy/plugins/base/emoji/emoji_picker_header.dart';
|
import 'package:appflowy/plugins/base/emoji/emoji_picker_header.dart';
|
||||||
import 'package:appflowy/plugins/base/emoji/emoji_search_bar.dart';
|
import 'package:appflowy/plugins/base/emoji/emoji_search_bar.dart';
|
||||||
import 'package:appflowy/plugins/base/emoji/emoji_skin_tone.dart';
|
import 'package:appflowy/plugins/base/emoji/emoji_skin_tone.dart';
|
||||||
import 'package:emoji_mart/emoji_mart.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/material.dart';
|
||||||
|
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||||
|
|
||||||
// use a global value to store the selected emoji to prevent reloading every time.
|
// use a global value to store the selected emoji to prevent reloading every time.
|
||||||
EmojiData? _cachedEmojiData;
|
EmojiData? _cachedEmojiData;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||||
import 'package:emoji_mart/emoji_mart.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/material.dart';
|
||||||
|
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||||
|
|
||||||
class FlowyEmojiHeader extends StatelessWidget {
|
class FlowyEmojiHeader extends StatelessWidget {
|
||||||
const FlowyEmojiHeader({
|
const FlowyEmojiHeader({
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:emoji_mart/emoji_mart.dart';
|
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||||
|
|
||||||
class FlowyEmojiPickerI18n extends EmojiPickerI18n {
|
class FlowyEmojiPickerI18n extends EmojiPickerI18n {
|
||||||
@override
|
@override
|
||||||
|
@ -3,10 +3,10 @@ import 'package:appflowy/generated/locale_keys.g.dart';
|
|||||||
import 'package:appflowy/plugins/base/emoji/emoji_skin_tone.dart';
|
import 'package:appflowy/plugins/base/emoji/emoji_skin_tone.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:emoji_mart/emoji_mart.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/flowy_tooltip.dart';
|
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||||
|
|
||||||
typedef EmojiKeywordChangedCallback = void Function(String keyword);
|
typedef EmojiKeywordChangedCallback = void Function(String keyword);
|
||||||
typedef EmojiSkinToneChanged = void Function(EmojiSkinTone skinTone);
|
typedef EmojiSkinToneChanged = void Function(EmojiSkinTone skinTone);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
import 'package:appflowy_popover/appflowy_popover.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:emoji_mart/emoji_mart.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/flowy_tooltip.dart';
|
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||||
|
|
||||||
// use a temporary global value to store last selected skin tone
|
// use a temporary global value to store last selected skin tone
|
||||||
EmojiSkinTone? lastSelectedEmojiSkinTone;
|
EmojiSkinTone? lastSelectedEmojiSkinTone;
|
||||||
|
@ -111,7 +111,7 @@ class _FlowyIconPickerState extends State<FlowyIconPicker>
|
|||||||
LocaleKeys.emoji_emojiTab.tr(),
|
LocaleKeys.emoji_emojiTab.tr(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -219,7 +219,7 @@ class CellController<T, D> extends Equatable {
|
|||||||
@override
|
@override
|
||||||
List<Object> get props => [
|
List<Object> get props => [
|
||||||
_cellCache.get(_cacheKey) ?? "",
|
_cellCache.get(_cacheKey) ?? "",
|
||||||
_cellContext.rowId + _cellContext.fieldInfo.id
|
_cellContext.rowId + _cellContext.fieldInfo.id,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ class FieldController {
|
|||||||
}
|
}
|
||||||
final List<FieldInfo> newFields = fieldInfos;
|
final List<FieldInfo> newFields = fieldInfos;
|
||||||
final Map<String, FieldIdPB> deletedFieldMap = {
|
final Map<String, FieldIdPB> deletedFieldMap = {
|
||||||
for (final fieldOrder in deletedFields) fieldOrder.fieldId: fieldOrder
|
for (final fieldOrder in deletedFields) fieldOrder.fieldId: fieldOrder,
|
||||||
};
|
};
|
||||||
|
|
||||||
newFields.retainWhere((field) => (deletedFieldMap[field.id] == null));
|
newFields.retainWhere((field) => (deletedFieldMap[field.id] == null));
|
||||||
|
@ -100,7 +100,7 @@ class RowList {
|
|||||||
final List<RowInfo> newRows = [];
|
final List<RowInfo> newRows = [];
|
||||||
final DeletedIndexs deletedIndex = [];
|
final DeletedIndexs deletedIndex = [];
|
||||||
final Map<String, String> deletedRowByRowId = {
|
final Map<String, String> deletedRowByRowId = {
|
||||||
for (var rowId in rowIds) rowId: rowId
|
for (final rowId in rowIds) rowId: rowId,
|
||||||
};
|
};
|
||||||
|
|
||||||
_rowInfos.asMap().forEach((index, RowInfo rowInfo) {
|
_rowInfos.asMap().forEach((index, RowInfo rowInfo) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import 'package:appflowy/plugins/database_view/tab_bar/tab_bar_view.dart';
|
|
||||||
import 'package:appflowy/plugins/database_view/tab_bar/tab_bar_add_button.dart';
|
import 'package:appflowy/plugins/database_view/tab_bar/tab_bar_add_button.dart';
|
||||||
|
import 'package:appflowy/plugins/database_view/tab_bar/tab_bar_view.dart';
|
||||||
import 'package:appflowy/workspace/application/view/prelude.dart';
|
import 'package:appflowy/workspace/application/view/prelude.dart';
|
||||||
import 'package:appflowy/workspace/application/view/view_ext.dart';
|
import 'package:appflowy/workspace/application/view/view_ext.dart';
|
||||||
import 'package:appflowy_backend/log.dart';
|
import 'package:appflowy_backend/log.dart';
|
||||||
@ -65,7 +65,8 @@ class DatabaseTabBarBloc
|
|||||||
if (updatePB.createChildViews.isNotEmpty) {
|
if (updatePB.createChildViews.isNotEmpty) {
|
||||||
final allTabBars = [
|
final allTabBars = [
|
||||||
...state.tabBars,
|
...state.tabBars,
|
||||||
...updatePB.createChildViews.map((e) => DatabaseTabBar(view: e))
|
...updatePB.createChildViews
|
||||||
|
.map((e) => DatabaseTabBar(view: e)),
|
||||||
];
|
];
|
||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
@ -80,7 +81,7 @@ class DatabaseTabBarBloc
|
|||||||
if (updatePB.deleteChildViews.isNotEmpty) {
|
if (updatePB.deleteChildViews.isNotEmpty) {
|
||||||
final allTabBars = [...state.tabBars];
|
final allTabBars = [...state.tabBars];
|
||||||
final tabBarControllerByViewId = {
|
final tabBarControllerByViewId = {
|
||||||
...state.tabBarControllerByViewId
|
...state.tabBarControllerByViewId,
|
||||||
};
|
};
|
||||||
var newSelectedIndex = state.selectedIndex;
|
var newSelectedIndex = state.selectedIndex;
|
||||||
for (final viewId in updatePB.deleteChildViews) {
|
for (final viewId in updatePB.deleteChildViews) {
|
||||||
@ -235,7 +236,7 @@ class DatabaseTabBarState with _$DatabaseTabBarState {
|
|||||||
tabBarControllerByViewId: {
|
tabBarControllerByViewId: {
|
||||||
view.id: DatabaseTabBarController(
|
view.id: DatabaseTabBarController(
|
||||||
view: view,
|
view: view,
|
||||||
)
|
),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ class _BoardColumnHeaderState extends State<BoardColumnHeader> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -431,7 +431,7 @@ class HiddenGroupPopupItemList extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
|
@ -283,7 +283,7 @@ class CalendarBloc extends Bloc<CalendarEvent, CalendarState> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fieldInfoByFieldId = {
|
fieldInfoByFieldId = {
|
||||||
for (var fieldInfo in fieldInfos) fieldInfo.field.id: fieldInfo
|
for (final fieldInfo in fieldInfos) fieldInfo.field.id: fieldInfo,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onRowsCreated: (rowIds) async {
|
onRowsCreated: (rowIds) async {
|
||||||
|
@ -230,7 +230,7 @@ class _EventCardState extends State<EventCard> {
|
|||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -435,7 +435,7 @@ class UnscheduleEventsList extends StatelessWidget {
|
|||||||
PopoverContainer.of(context).close();
|
PopoverContainer.of(context).close();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
|
@ -50,7 +50,7 @@ class FieldTypeOptionEditor extends StatelessWidget {
|
|||||||
|
|
||||||
final List<Widget> children = [
|
final List<Widget> children = [
|
||||||
SwitchFieldButton(popoverMutex: popoverMutex),
|
SwitchFieldButton(popoverMutex: popoverMutex),
|
||||||
if (typeOptionWidget != null) typeOptionWidget
|
if (typeOptionWidget != null) typeOptionWidget,
|
||||||
];
|
];
|
||||||
|
|
||||||
return ListView(
|
return ListView(
|
||||||
|
@ -48,7 +48,7 @@ class SelectOptionTypeOptionWidget extends StatelessWidget {
|
|||||||
const VSpace(10),
|
const VSpace(10),
|
||||||
if (state.options.isEmpty && !state.isEditingOption)
|
if (state.options.isEmpty && !state.isEditingOption)
|
||||||
const _AddOptionButton(),
|
const _AddOptionButton(),
|
||||||
_OptionList(popoverMutex: popoverMutex)
|
_OptionList(popoverMutex: popoverMutex),
|
||||||
];
|
];
|
||||||
|
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
@ -77,7 +77,7 @@ class OptionTitle extends StatelessWidget {
|
|||||||
child: FlowyText.medium(
|
child: FlowyText.medium(
|
||||||
LocaleKeys.grid_field_optionTitle.tr(),
|
LocaleKeys.grid_field_optionTitle.tr(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
if (state.options.isNotEmpty && !state.isEditingOption) {
|
if (state.options.isNotEmpty && !state.isEditingOption) {
|
||||||
children.add(const Spacer());
|
children.add(const Spacer());
|
||||||
|
@ -19,7 +19,7 @@ class GridShortcuts extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<ShortcutActivator, Intent> bindKeys(List<LogicalKeyboardKey> keys) {
|
Map<ShortcutActivator, Intent> bindKeys(List<LogicalKeyboardKey> keys) {
|
||||||
return {for (var key in keys) LogicalKeySet(key): KeyboardKeyIdent(key)};
|
return {for (final key in keys) LogicalKeySet(key): KeyboardKeyIdent(key)};
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Type, Action<Intent>> bindActions() {
|
Map<Type, Action<Intent>> bindActions() {
|
||||||
|
@ -123,7 +123,7 @@ class SelectOptionTag extends StatelessWidget {
|
|||||||
FlowySvgs.close_s,
|
FlowySvgs.close_s,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -126,7 +126,7 @@ class _GridTextCellState extends GridEditableTextCell<GridTextCell> {
|
|||||||
isDense: true,
|
isDense: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -265,13 +265,17 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
|
|||||||
child: MobileFloatingToolbar(
|
child: MobileFloatingToolbar(
|
||||||
editorState: editorState,
|
editorState: editorState,
|
||||||
editorScrollController: editorScrollController,
|
editorScrollController: editorScrollController,
|
||||||
toolbarBuilder: (context, anchor) {
|
toolbarBuilder: (context, anchor, closeToolbar) {
|
||||||
return AdaptiveTextSelectionToolbar.editable(
|
return AdaptiveTextSelectionToolbar.editable(
|
||||||
clipboardStatus: ClipboardStatus.pasteable,
|
clipboardStatus: ClipboardStatus.pasteable,
|
||||||
onCopy: () => copyCommand.execute(editorState),
|
onCopy: () {
|
||||||
|
copyCommand.execute(editorState);
|
||||||
|
closeToolbar();
|
||||||
|
},
|
||||||
onCut: () => cutCommand.execute(editorState),
|
onCut: () => cutCommand.execute(editorState),
|
||||||
onPaste: () => pasteCommand.execute(editorState),
|
onPaste: () => pasteCommand.execute(editorState),
|
||||||
onSelectAll: () => selectAllCommand.execute(editorState),
|
onSelectAll: () => selectAllCommand.execute(editorState),
|
||||||
|
onLiveTextInput: null,
|
||||||
anchors: TextSelectionToolbarAnchors(
|
anchors: TextSelectionToolbarAnchors(
|
||||||
primaryAnchor: anchor,
|
primaryAnchor: anchor,
|
||||||
),
|
),
|
||||||
|
@ -79,7 +79,7 @@ class BlockOptionButton extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: LocaleKeys.document_plugins_optionAction_toOpenMenu.tr(),
|
text: LocaleKeys.document_plugins_optionAction_toOpenMenu.tr(),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -170,7 +170,7 @@ class _BuiltInPageWidgetState extends State<BuiltInPageWidget> {
|
|||||||
}
|
}
|
||||||
controller.close();
|
controller.close();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ extension InsertDatabase on EditorState {
|
|||||||
MentionBlockKeys.mention: {
|
MentionBlockKeys.mention: {
|
||||||
MentionBlockKeys.type: MentionType.page.name,
|
MentionBlockKeys.type: MentionType.page.name,
|
||||||
MentionBlockKeys.pageId: view.id,
|
MentionBlockKeys.pageId: view.id,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -44,13 +44,15 @@ void showLinkToPageMenu(
|
|||||||
await editorState.insertReferencePage(viewPB, pageType);
|
await editorState.insertReferencePage(viewPB, pageType);
|
||||||
linkToPageMenuEntry.remove();
|
linkToPageMenuEntry.remove();
|
||||||
} on FlowyError catch (e) {
|
} on FlowyError catch (e) {
|
||||||
Dialogs.show(
|
if (context.mounted) {
|
||||||
child: FlowyErrorPage.message(
|
Dialogs.show(
|
||||||
e.msg,
|
child: FlowyErrorPage.message(
|
||||||
howToFix: LocaleKeys.errorDialog_howToFixFallback.tr(),
|
e.msg,
|
||||||
),
|
howToFix: LocaleKeys.errorDialog_howToFixFallback.tr(),
|
||||||
context,
|
),
|
||||||
);
|
context,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -149,7 +151,7 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
|
|||||||
LogicalKeyboardKey.arrowUp,
|
LogicalKeyboardKey.arrowUp,
|
||||||
LogicalKeyboardKey.arrowDown,
|
LogicalKeyboardKey.arrowDown,
|
||||||
LogicalKeyboardKey.tab,
|
LogicalKeyboardKey.tab,
|
||||||
LogicalKeyboardKey.enter
|
LogicalKeyboardKey.enter,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!acceptedKeys.contains(event.logicalKey)) {
|
if (!acceptedKeys.contains(event.logicalKey)) {
|
||||||
|
@ -119,7 +119,7 @@ extension PasteNodes on EditorState {
|
|||||||
if (nodes.last.children.isNotEmpty) {
|
if (nodes.last.children.isNotEmpty) {
|
||||||
return [
|
return [
|
||||||
...path,
|
...path,
|
||||||
...calculatePath([0], nodes.last.children.toList())
|
...calculatePath([0], nodes.last.children.toList()),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return path;
|
return path;
|
||||||
|
@ -19,7 +19,7 @@ const String kLocalImagesKey = 'local_images';
|
|||||||
|
|
||||||
List<String> get builtInAssetImages => [
|
List<String> get builtInAssetImages => [
|
||||||
"assets/images/app_flowy_abstract_cover_1.jpg",
|
"assets/images/app_flowy_abstract_cover_1.jpg",
|
||||||
"assets/images/app_flowy_abstract_cover_2.jpg"
|
"assets/images/app_flowy_abstract_cover_2.jpg",
|
||||||
];
|
];
|
||||||
|
|
||||||
class ChangeCoverPopover extends StatefulWidget {
|
class ChangeCoverPopover extends StatefulWidget {
|
||||||
|
@ -102,7 +102,7 @@ class ChangeCoverPopoverBloc
|
|||||||
transaction.updateNode(node, {
|
transaction.updateNode(node, {
|
||||||
DocumentHeaderBlockKeys.coverType: CoverType.none.toString(),
|
DocumentHeaderBlockKeys.coverType: CoverType.none.toString(),
|
||||||
DocumentHeaderBlockKeys.icon:
|
DocumentHeaderBlockKeys.icon:
|
||||||
node.attributes[DocumentHeaderBlockKeys.icon]
|
node.attributes[DocumentHeaderBlockKeys.icon],
|
||||||
});
|
});
|
||||||
return editorState.apply(transaction);
|
return editorState.apply(transaction);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ class _NetworkImageUrlInputState extends State<NetworkImageUrlInput> {
|
|||||||
title: LocaleKeys.document_plugins_cover_add.tr(),
|
title: LocaleKeys.document_plugins_cover_add.tr(),
|
||||||
borderRadius: Corners.s8Border,
|
borderRadius: Corners.s8Border,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -322,7 +322,7 @@ class _CoverImagePreviewWidgetState extends State<CoverImagePreviewWidget> {
|
|||||||
(l) => _buildImageDeleteButton(context),
|
(l) => _buildImageDeleteButton(context),
|
||||||
(r) => Container(),
|
(r) => Container(),
|
||||||
)
|
)
|
||||||
: Container()
|
: Container(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ class _DocumentHeaderNodeWidgetState extends State<DocumentHeaderNodeWidget> {
|
|||||||
DocumentHeaderBlockKeys.coverDetails:
|
DocumentHeaderBlockKeys.coverDetails:
|
||||||
widget.node.attributes[DocumentHeaderBlockKeys.coverDetails],
|
widget.node.attributes[DocumentHeaderBlockKeys.coverDetails],
|
||||||
DocumentHeaderBlockKeys.icon:
|
DocumentHeaderBlockKeys.icon:
|
||||||
widget.node.attributes[DocumentHeaderBlockKeys.icon]
|
widget.node.attributes[DocumentHeaderBlockKeys.icon],
|
||||||
};
|
};
|
||||||
if (cover != null) {
|
if (cover != null) {
|
||||||
attributes[DocumentHeaderBlockKeys.coverType] = cover.$1.toString();
|
attributes[DocumentHeaderBlockKeys.coverType] = cover.$1.toString();
|
||||||
@ -398,7 +398,7 @@ class DocumentCoverState extends State<DocumentCover> {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: _buildCoverImage(),
|
child: _buildCoverImage(),
|
||||||
),
|
),
|
||||||
if (!isOverlayButtonsHidden) _buildCoverOverlayButtons(context)
|
if (!isOverlayButtonsHidden) _buildCoverOverlayButtons(context),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -88,7 +88,7 @@ class _OpenAIImageWidgetState extends State<OpenAIImageWidget> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ class _StabilityAIImageWidgetState extends State<StabilityAIImageWidget> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ Future<void> _insertDateReference(EditorState editorState) async {
|
|||||||
MentionBlockKeys.mention: {
|
MentionBlockKeys.mention: {
|
||||||
MentionBlockKeys.type: MentionType.date.name,
|
MentionBlockKeys.type: MentionType.date.name,
|
||||||
MentionBlockKeys.date: DateTime.now().toIso8601String(),
|
MentionBlockKeys.date: DateTime.now().toIso8601String(),
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ class _AutoCompletionBlockComponentState
|
|||||||
onKeep: _onExit,
|
onKeep: _onExit,
|
||||||
onRewrite: _onRewrite,
|
onRewrite: _onRewrite,
|
||||||
onDiscard: _onDiscard,
|
onDiscard: _onDiscard,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -477,7 +477,7 @@ class AutoCompletionHeader extends StatelessWidget {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
await openLearnMorePage();
|
await openLearnMorePage();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ class Loading {
|
|||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: CircularProgressIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -254,7 +254,7 @@ class _SmartEditInputWidgetState extends State<SmartEditInputWidget> {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
await openLearnMorePage();
|
await openLearnMorePage();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ class EditorStyleCustomizer {
|
|||||||
fontSize + 8,
|
fontSize + 8,
|
||||||
fontSize + 4,
|
fontSize + 4,
|
||||||
fontSize + 2,
|
fontSize + 2,
|
||||||
fontSize
|
fontSize,
|
||||||
];
|
];
|
||||||
return TextStyle(
|
return TextStyle(
|
||||||
fontSize: fontSizes.elementAtOrNull(level - 1) ?? fontSize,
|
fontSize: fontSizes.elementAtOrNull(level - 1) ?? fontSize,
|
||||||
|
@ -31,7 +31,7 @@ class ExportPageWidget extends StatelessWidget {
|
|||||||
width: 100,
|
width: 100,
|
||||||
height: 30,
|
height: 30,
|
||||||
onPressed: onTap,
|
onPressed: onTap,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class DocumentMoreButton extends StatelessWidget {
|
|||||||
BlocProvider.value(
|
BlocProvider.value(
|
||||||
value: context.read<DocumentAppearanceCubit>(),
|
value: context.read<DocumentAppearanceCubit>(),
|
||||||
child: const FontSizeSwitcher(),
|
child: const FontSizeSwitcher(),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -124,7 +124,7 @@ class DateReferenceService {
|
|||||||
MentionBlockKeys.mention: {
|
MentionBlockKeys.mention: {
|
||||||
MentionBlockKeys.type: MentionType.date.name,
|
MentionBlockKeys.type: MentionType.date.name,
|
||||||
MentionBlockKeys.date: date.toIso8601String(),
|
MentionBlockKeys.date: date.toIso8601String(),
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class InlinePageReferenceService {
|
|||||||
MentionBlockKeys.mention: {
|
MentionBlockKeys.mention: {
|
||||||
MentionBlockKeys.type: MentionType.page.name,
|
MentionBlockKeys.type: MentionType.page.name,
|
||||||
MentionBlockKeys.pageId: view.id,
|
MentionBlockKeys.pageId: view.id,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ class ReminderReferenceService {
|
|||||||
MentionBlockKeys.type: MentionType.reminder.name,
|
MentionBlockKeys.type: MentionType.reminder.name,
|
||||||
MentionBlockKeys.date: date.toIso8601String(),
|
MentionBlockKeys.date: date.toIso8601String(),
|
||||||
MentionBlockKeys.uid: reminder.id,
|
MentionBlockKeys.uid: reminder.id,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ class _InlineActionsHandlerState extends State<InlineActionsHandler> {
|
|||||||
![
|
![
|
||||||
...moveKeys,
|
...moveKeys,
|
||||||
LogicalKeyboardKey.arrowLeft,
|
LogicalKeyboardKey.arrowLeft,
|
||||||
LogicalKeyboardKey.arrowRight
|
LogicalKeyboardKey.arrowRight,
|
||||||
].contains(event.logicalKey)) {
|
].contains(event.logicalKey)) {
|
||||||
/// Prevents dismissal of context menu by notifying the parent
|
/// Prevents dismissal of context menu by notifying the parent
|
||||||
/// that the selection change occurred from the handler.
|
/// that the selection change occurred from the handler.
|
||||||
|
@ -110,7 +110,7 @@ class _TrashPageState extends State<TrashPage> {
|
|||||||
onTap: () =>
|
onTap: () =>
|
||||||
context.read<TrashBloc>().add(const TrashEvent.deleteAll()),
|
context.read<TrashBloc>().add(const TrashEvent.deleteAll()),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -75,7 +75,7 @@ class FlowyRunner {
|
|||||||
InitSupabaseTask(),
|
InitSupabaseTask(),
|
||||||
InitAppFlowyCloudTask(),
|
InitAppFlowyCloudTask(),
|
||||||
const InitAppWidgetTask(),
|
const InitAppWidgetTask(),
|
||||||
const InitPlatformServiceTask()
|
const InitPlatformServiceTask(),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -100,7 +100,7 @@ class AFCloudAuthService implements AuthService {
|
|||||||
authType: AuthTypePB.AFCloud,
|
authType: AuthTypePB.AFCloud,
|
||||||
map: {
|
map: {
|
||||||
AuthServiceMapKeys.signInURL: uri.toString(),
|
AuthServiceMapKeys.signInURL: uri.toString(),
|
||||||
AuthServiceMapKeys.deviceId: deviceId
|
AuthServiceMapKeys.deviceId: deviceId,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
final result = await UserEventOauthSignIn(payload)
|
final result = await UserEventOauthSignIn(payload)
|
||||||
|
@ -97,7 +97,7 @@ class SupabaseAuthService implements AuthService {
|
|||||||
map: {
|
map: {
|
||||||
AuthServiceMapKeys.uuid: userId,
|
AuthServiceMapKeys.uuid: userId,
|
||||||
AuthServiceMapKeys.email: userEmail,
|
AuthServiceMapKeys.email: userEmail,
|
||||||
AuthServiceMapKeys.deviceId: await getDeviceId()
|
AuthServiceMapKeys.deviceId: await getDeviceId(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -140,7 +140,7 @@ class SupabaseAuthService implements AuthService {
|
|||||||
map: {
|
map: {
|
||||||
AuthServiceMapKeys.uuid: userId,
|
AuthServiceMapKeys.uuid: userId,
|
||||||
AuthServiceMapKeys.email: userEmail,
|
AuthServiceMapKeys.email: userEmail,
|
||||||
AuthServiceMapKeys.deviceId: await getDeviceId()
|
AuthServiceMapKeys.deviceId: await getDeviceId(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -61,7 +61,7 @@ class MockAuthService implements AuthService {
|
|||||||
map: {
|
map: {
|
||||||
AuthServiceMapKeys.uuid: uuid,
|
AuthServiceMapKeys.uuid: uuid,
|
||||||
AuthServiceMapKeys.email: email,
|
AuthServiceMapKeys.email: email,
|
||||||
AuthServiceMapKeys.deviceId: 'MockDeviceId'
|
AuthServiceMapKeys.deviceId: 'MockDeviceId',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class HistoricalUserList extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
itemCount: state.historicalUsers.length,
|
itemCount: state.historicalUsers.length,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ class SignUpForm extends StatelessWidget {
|
|||||||
if (context.read<SignUpBloc>().state.isSubmitting) ...[
|
if (context.read<SignUpBloc>().state.isSubmitting) ...[
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
const LinearProgressIndicator(value: null),
|
const LinearProgressIndicator(value: null),
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -129,7 +129,7 @@ class WorkspaceErrorDescription extends StatelessWidget {
|
|||||||
"Error code: ${state.initialError.code.value.toString()}",
|
"Error code: ${state.initialError.code.value.toString()}",
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -185,7 +185,7 @@ class CreateFolderWidgetState extends State<CreateFolderWidget> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class FavoriteFolder extends StatelessWidget {
|
|||||||
onTertiarySelected: (view) =>
|
onTertiarySelected: (view) =>
|
||||||
context.read<TabsBloc>().openTab(view),
|
context.read<TabsBloc>().openTab(view),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -62,7 +62,7 @@ class PersonalFolder extends StatelessWidget {
|
|||||||
onTertiarySelected: (view) =>
|
onTertiarySelected: (view) =>
|
||||||
context.read<TabsBloc>().openTab(view),
|
context.read<TabsBloc>().openTab(view),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -136,7 +136,7 @@ class _PersonalFolderHeaderState extends State<PersonalFolderHeader> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -51,7 +51,7 @@ class HomeSideBar extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
BlocProvider(
|
BlocProvider(
|
||||||
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
child: MultiBlocListener(
|
child: MultiBlocListener(
|
||||||
listeners: [
|
listeners: [
|
||||||
|
@ -324,7 +324,7 @@ class _SingleInnerViewItemState extends State<SingleInnerViewItem> {
|
|||||||
widget.view.name,
|
widget.view.name,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
// hover action
|
// hover action
|
||||||
|
@ -76,7 +76,7 @@ class SettingsDialog extends StatelessWidget {
|
|||||||
context.read<SettingsDialogBloc>().state.page,
|
context.read<SettingsDialogBloc>().state.page,
|
||||||
context.read<SettingsDialogBloc>().state.userProfile,
|
context.read<SettingsDialogBloc>().state.userProfile,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -373,7 +373,7 @@ final Map<String, String> smileys = Map.fromIterables([
|
|||||||
'Rescue Worker’s Helmet',
|
'Rescue Worker’s Helmet',
|
||||||
'Lipstick',
|
'Lipstick',
|
||||||
'Ring',
|
'Ring',
|
||||||
'Briefcase'
|
'Briefcase',
|
||||||
], [
|
], [
|
||||||
'😀',
|
'😀',
|
||||||
'😃',
|
'😃',
|
||||||
@ -734,7 +734,7 @@ final Map<String, String> smileys = Map.fromIterables([
|
|||||||
'⛑',
|
'⛑',
|
||||||
'💄',
|
'💄',
|
||||||
'💍',
|
'💍',
|
||||||
'💼'
|
'💼',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Map of all possible emojis along with their names in [Category.ANIMALS]
|
/// Map of all possible emojis along with their names in [Category.ANIMALS]
|
||||||
@ -919,7 +919,7 @@ final Map<String, String> animals = Map.fromIterables([
|
|||||||
'Christmas Tree',
|
'Christmas Tree',
|
||||||
'Sparkles',
|
'Sparkles',
|
||||||
'Tanabata Tree',
|
'Tanabata Tree',
|
||||||
'Pine Decoration'
|
'Pine Decoration',
|
||||||
], [
|
], [
|
||||||
'🐶',
|
'🐶',
|
||||||
'🐱',
|
'🐱',
|
||||||
@ -1101,7 +1101,7 @@ final Map<String, String> animals = Map.fromIterables([
|
|||||||
'🎄',
|
'🎄',
|
||||||
'✨',
|
'✨',
|
||||||
'🎋',
|
'🎋',
|
||||||
'🎍'
|
'🎍',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Map of all possible emojis along with their names in [Category.FOODS]
|
/// Map of all possible emojis along with their names in [Category.FOODS]
|
||||||
@ -1210,7 +1210,7 @@ final Map<String, String> foods = Map.fromIterables([
|
|||||||
'Chopsticks',
|
'Chopsticks',
|
||||||
'Fork and Knife With Plate',
|
'Fork and Knife With Plate',
|
||||||
'Fork and Knife',
|
'Fork and Knife',
|
||||||
'Spoon'
|
'Spoon',
|
||||||
], [
|
], [
|
||||||
'🍇',
|
'🍇',
|
||||||
'🍈',
|
'🍈',
|
||||||
@ -1316,7 +1316,7 @@ final Map<String, String> foods = Map.fromIterables([
|
|||||||
'🥢',
|
'🥢',
|
||||||
'🍽',
|
'🍽',
|
||||||
'🍴',
|
'🍴',
|
||||||
'🥄'
|
'🥄',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Map of all possible emojis along with their names in [Category.TRAVEL]
|
/// Map of all possible emojis along with their names in [Category.TRAVEL]
|
||||||
@ -1445,7 +1445,7 @@ final Map<String, String> travel = Map.fromIterables([
|
|||||||
'Passport Control',
|
'Passport Control',
|
||||||
'Customs',
|
'Customs',
|
||||||
'Baggage Claim',
|
'Baggage Claim',
|
||||||
'Left Luggage'
|
'Left Luggage',
|
||||||
], [
|
], [
|
||||||
'🚣',
|
'🚣',
|
||||||
'🗾',
|
'🗾',
|
||||||
@ -1571,7 +1571,7 @@ final Map<String, String> travel = Map.fromIterables([
|
|||||||
'🛂',
|
'🛂',
|
||||||
'🛃',
|
'🛃',
|
||||||
'🛄',
|
'🛄',
|
||||||
'🛅'
|
'🛅',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Map of all possible emojis along with their names in [Category.ACTIVITIES]
|
/// Map of all possible emojis along with their names in [Category.ACTIVITIES]
|
||||||
@ -1667,7 +1667,7 @@ final Map<String, String> activities = Map.fromIterables([
|
|||||||
'Violin',
|
'Violin',
|
||||||
'Drum',
|
'Drum',
|
||||||
'Clapper Board',
|
'Clapper Board',
|
||||||
'Bow and Arrow'
|
'Bow and Arrow',
|
||||||
], [
|
], [
|
||||||
'🕴',
|
'🕴',
|
||||||
'🧗',
|
'🧗',
|
||||||
@ -1760,7 +1760,7 @@ final Map<String, String> activities = Map.fromIterables([
|
|||||||
'🎻',
|
'🎻',
|
||||||
'🥁',
|
'🥁',
|
||||||
'🎬',
|
'🎬',
|
||||||
'🏹'
|
'🏹',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Map of all possible emojis along with their names in [Category.OBJECTS]
|
/// Map of all possible emojis along with their names in [Category.OBJECTS]
|
||||||
@ -1962,7 +1962,7 @@ final Map<String, String> objects = Map.fromIterables([
|
|||||||
'Coffin',
|
'Coffin',
|
||||||
'Funeral Urn',
|
'Funeral Urn',
|
||||||
'Moai',
|
'Moai',
|
||||||
'Potable Water'
|
'Potable Water',
|
||||||
], [
|
], [
|
||||||
'💌',
|
'💌',
|
||||||
'🕳',
|
'🕳',
|
||||||
@ -2161,7 +2161,7 @@ final Map<String, String> objects = Map.fromIterables([
|
|||||||
'⚰',
|
'⚰',
|
||||||
'⚱',
|
'⚱',
|
||||||
'🗿',
|
'🗿',
|
||||||
'🚰'
|
'🚰',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Map of all possible emojis along with their names in [Category.SYMBOLS]
|
/// Map of all possible emojis along with their names in [Category.SYMBOLS]
|
||||||
@ -2424,7 +2424,7 @@ final Map<String, String> symbols = Map.fromIterables([
|
|||||||
'Red Triangle Pointed Down',
|
'Red Triangle Pointed Down',
|
||||||
'Diamond With a Dot',
|
'Diamond With a Dot',
|
||||||
'White Square Button',
|
'White Square Button',
|
||||||
'Black Square Button'
|
'Black Square Button',
|
||||||
], [
|
], [
|
||||||
'💘',
|
'💘',
|
||||||
'💝',
|
'💝',
|
||||||
@ -2684,7 +2684,7 @@ final Map<String, String> symbols = Map.fromIterables([
|
|||||||
'🔻',
|
'🔻',
|
||||||
'💠',
|
'💠',
|
||||||
'🔳',
|
'🔳',
|
||||||
'🔲'
|
'🔲',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Map of all possible emojis along with their names in [Category.FLAGS]
|
/// Map of all possible emojis along with their names in [Category.FLAGS]
|
||||||
@ -2953,7 +2953,7 @@ final Map<String, String> flags = Map.fromIterables([
|
|||||||
'Flag: Mayotte',
|
'Flag: Mayotte',
|
||||||
'Flag: South Africa',
|
'Flag: South Africa',
|
||||||
'Flag: Zambia',
|
'Flag: Zambia',
|
||||||
'Flag: Zimbabwe'
|
'Flag: Zimbabwe',
|
||||||
], [
|
], [
|
||||||
'🏁',
|
'🏁',
|
||||||
'🚩',
|
'🚩',
|
||||||
@ -3219,5 +3219,5 @@ final Map<String, String> flags = Map.fromIterables([
|
|||||||
'🇾🇹',
|
'🇾🇹',
|
||||||
'🇿🇦',
|
'🇿🇦',
|
||||||
'🇿🇲',
|
'🇿🇲',
|
||||||
'🇿🇼'
|
'🇿🇼',
|
||||||
]);
|
]);
|
||||||
|
@ -226,7 +226,7 @@ class EmojiPickerState extends State<EmojiPicker> {
|
|||||||
EmojiCategoryGroup(
|
EmojiCategoryGroup(
|
||||||
EmojiCategory.FLAGS,
|
EmojiCategory.FLAGS,
|
||||||
await _getAvailableEmojis(emoji_list.flags, title: 'flags'),
|
await _getAvailableEmojis(emoji_list.flags, title: 'flags'),
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class SettingThirdPartyLogin extends StatelessWidget {
|
|||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
const HSpace(6),
|
const HSpace(6),
|
||||||
indicator
|
indicator,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const VSpace(6),
|
const VSpace(6),
|
||||||
|
@ -122,7 +122,7 @@ class ColorSchemeUploadPopover extends StatelessWidget {
|
|||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList()
|
.toList(),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -168,7 +168,7 @@ class ColorSchemeUploadPopover extends StatelessWidget {
|
|||||||
width: 20,
|
width: 20,
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
bloc.add(DynamicPluginEvent.removePlugin(name: theme)),
|
bloc.add(DynamicPluginEvent.removePlugin(name: theme)),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -34,7 +34,7 @@ class LayoutDirectionSetting extends StatelessWidget {
|
|||||||
_layoutDirectionItemButton(context, LayoutDirection.rtlLayout),
|
_layoutDirectionItemButton(context, LayoutDirection.rtlLayout),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ class TextDirectionSetting extends StatelessWidget {
|
|||||||
_textDirectionItemButton(context, AppFlowyTextDirection.auto),
|
_textDirectionItemButton(context, AppFlowyTextDirection.auto),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class _ThemeFontFamilySettingState extends State<ThemeFontFamilySetting> {
|
|||||||
trailing: [
|
trailing: [
|
||||||
FontFamilyDropDown(
|
FontFamilyDropDown(
|
||||||
currentFontFamily: widget.currentFontFamily,
|
currentFontFamily: widget.currentFontFamily,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -127,12 +127,12 @@ class ShortcutsListTile extends StatelessWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
showKeyListenerDialog(context);
|
showKeyListenerDialog(context);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(
|
Divider(
|
||||||
color: Theme.of(context).dividerColor,
|
color: Theme.of(context).dividerColor,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -2,18 +2,19 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||||
import 'package:appflowy/startup/entry_point.dart';
|
import 'package:appflowy/startup/entry_point.dart';
|
||||||
import 'package:flowy_infra/file_picker/file_picker_service.dart';
|
|
||||||
import 'package:appflowy/workspace/application/settings/settings_location_cubit.dart';
|
import 'package:appflowy/workspace/application/settings/settings_location_cubit.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flowy_infra/file_picker/file_picker_service.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:flowy_infra_ui/widget/buttons/secondary_button.dart';
|
import 'package:flowy_infra_ui/widget/buttons/secondary_button.dart';
|
||||||
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
import '../../../../generated/locale_keys.g.dart';
|
import '../../../../generated/locale_keys.g.dart';
|
||||||
import '../../../../startup/launch_configuration.dart';
|
import '../../../../startup/launch_configuration.dart';
|
||||||
import '../../../../startup/startup.dart';
|
import '../../../../startup/startup.dart';
|
||||||
@ -172,7 +173,10 @@ class _ChangeStoragePathButtonState extends State<_ChangeStoragePathButton> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// pick the new directory and reload app
|
// pick the new directory and reload app
|
||||||
final path = await getIt<FilePickerService>().getDirectoryPath();
|
final path = await getIt<FilePickerService>().getDirectoryPath();
|
||||||
if (path == null || !mounted || widget.usingPath == path) {
|
if (path == null || widget.usingPath == path) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!mounted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await context.read<SettingsLocationCubit>().setCustomPath(path);
|
await context.read<SettingsLocationCubit>().setCustomPath(path);
|
||||||
@ -245,7 +249,10 @@ class _RecoverDefaultStorageButtonState
|
|||||||
// reset to the default directory and reload app
|
// reset to the default directory and reload app
|
||||||
final directory = await appFlowyApplicationDataDirectory();
|
final directory = await appFlowyApplicationDataDirectory();
|
||||||
final path = directory.path;
|
final path = directory.path;
|
||||||
if (!mounted || widget.usingPath == path) {
|
if (widget.usingPath == path) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!mounted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await context
|
await context
|
||||||
|
@ -2,21 +2,22 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:appflowy/startup/startup.dart';
|
import 'package:appflowy/startup/startup.dart';
|
||||||
import 'package:appflowy/workspace/application/export/document_exporter.dart';
|
import 'package:appflowy/workspace/application/export/document_exporter.dart';
|
||||||
import 'package:appflowy/workspace/presentation/home/toast.dart';
|
|
||||||
import 'package:appflowy_backend/dispatch/dispatch.dart';
|
|
||||||
import 'package:flowy_infra/file_picker/file_picker_service.dart';
|
|
||||||
import 'package:appflowy/workspace/application/settings/settings_file_exporter_cubit.dart';
|
import 'package:appflowy/workspace/application/settings/settings_file_exporter_cubit.dart';
|
||||||
import 'package:appflowy/workspace/application/settings/share/export_service.dart';
|
import 'package:appflowy/workspace/application/settings/share/export_service.dart';
|
||||||
|
import 'package:appflowy/workspace/presentation/home/toast.dart';
|
||||||
|
import 'package:appflowy_backend/dispatch/dispatch.dart';
|
||||||
import 'package:appflowy_backend/log.dart';
|
import 'package:appflowy_backend/log.dart';
|
||||||
|
import 'package:appflowy_backend/protobuf/flowy-error/errors.pbserver.dart';
|
||||||
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart';
|
||||||
|
import 'package:appflowy_backend/protobuf/flowy-folder2/workspace.pb.dart';
|
||||||
import 'package:dartz/dartz.dart' as dartz;
|
import 'package:dartz/dartz.dart' as dartz;
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flowy_infra/file_picker/file_picker_service.dart';
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart' hide WidgetBuilder;
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart' hide WidgetBuilder;
|
||||||
import 'package:appflowy_backend/protobuf/flowy-error/errors.pbserver.dart';
|
|
||||||
import 'package:appflowy_backend/protobuf/flowy-folder2/workspace.pb.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
|
|
||||||
import '../../../../generated/locale_keys.g.dart';
|
import '../../../../generated/locale_keys.g.dart';
|
||||||
|
|
||||||
class FileExporterWidget extends StatefulWidget {
|
class FileExporterWidget extends StatefulWidget {
|
||||||
@ -69,13 +70,13 @@ class _FileExporterWidgetState extends State<FileExporterWidget> {
|
|||||||
.selectOrDeselectAllItems();
|
.selectOrDeselectAllItems();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const VSpace(8),
|
const VSpace(8),
|
||||||
const Expanded(child: _ExpandedList()),
|
const Expanded(child: _ExpandedList()),
|
||||||
const VSpace(8),
|
const VSpace(8),
|
||||||
_buildButtons()
|
_buildButtons(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -107,18 +108,20 @@ class _FileExporterWidgetState extends State<FileExporterWidget> {
|
|||||||
final views = cubit!.state.selectedViews;
|
final views = cubit!.state.selectedViews;
|
||||||
final result =
|
final result =
|
||||||
await _AppFlowyFileExporter.exportToPath(exportPath, views);
|
await _AppFlowyFileExporter.exportToPath(exportPath, views);
|
||||||
if (result.$1 && mounted) {
|
if (mounted) {
|
||||||
// success
|
if (result.$1) {
|
||||||
showSnackBarMessage(
|
// success
|
||||||
context,
|
showSnackBarMessage(
|
||||||
LocaleKeys.settings_files_exportFileSuccess.tr(),
|
context,
|
||||||
);
|
LocaleKeys.settings_files_exportFileSuccess.tr(),
|
||||||
} else {
|
);
|
||||||
showSnackBarMessage(
|
} else {
|
||||||
context,
|
showSnackBarMessage(
|
||||||
LocaleKeys.settings_files_exportFileFail.tr() +
|
context,
|
||||||
result.$2.join('\n'),
|
LocaleKeys.settings_files_exportFileFail.tr() +
|
||||||
);
|
result.$2.join('\n'),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
showSnackBarMessage(
|
showSnackBarMessage(
|
||||||
|
@ -16,7 +16,7 @@ class _SettingsFileSystemViewState extends State<SettingsFileSystemView> {
|
|||||||
late final _items = [
|
late final _items = [
|
||||||
const SettingsFileLocationCustomizer(),
|
const SettingsFileLocationCustomizer(),
|
||||||
// disable export data for v0.2.0 in release mode.
|
// disable export data for v0.2.0 in release mode.
|
||||||
if (kDebugMode) const SettingsExportFileWidget()
|
if (kDebugMode) const SettingsExportFileWidget(),
|
||||||
];
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -33,7 +33,7 @@ class SettingsNotificationsView extends StatelessWidget {
|
|||||||
.read<NotificationSettingsCubit>()
|
.read<NotificationSettingsCubit>()
|
||||||
.toggleNotificationsEnabled();
|
.toggleNotificationsEnabled();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -56,7 +56,7 @@ class SettingsUserView extends StatelessWidget {
|
|||||||
_buildUserIconSetting(context),
|
_buildUserIconSetting(context),
|
||||||
if (isCloudEnabled && user.authType != AuthTypePB.Local) ...[
|
if (isCloudEnabled && user.authType != AuthTypePB.Local) ...[
|
||||||
const VSpace(12),
|
const VSpace(12),
|
||||||
UserEmailInput(user.email)
|
UserEmailInput(user.email),
|
||||||
],
|
],
|
||||||
const VSpace(12),
|
const VSpace(12),
|
||||||
_renderCurrentOpenaiKey(context),
|
_renderCurrentOpenaiKey(context),
|
||||||
|
@ -87,7 +87,7 @@ class EnableEncrypt extends StatelessWidget {
|
|||||||
.add(CloudSettingEvent.enableEncrypt(value));
|
.add(CloudSettingEvent.enableEncrypt(value));
|
||||||
},
|
},
|
||||||
value: state.config.enableEncrypt,
|
value: state.config.enableEncrypt,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
@ -128,7 +128,7 @@ class EnableEncrypt extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -154,7 +154,7 @@ class EnableSync extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
value: state.config.enableSync,
|
value: state.config.enableSync,
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -88,7 +88,7 @@ class _NavigatorTextFieldDialogState extends State<NavigatorTextFieldDialog> {
|
|||||||
}
|
}
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -149,8 +149,8 @@ class _CreateFlowyAlertDialog extends State<NavigatorAlertDialog> {
|
|||||||
widget.cancel?.call();
|
widget.cancel?.call();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -209,7 +209,7 @@ class NavigatorOkCancelDialog extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
okTitle: okTitle?.toUpperCase(),
|
okTitle: okTitle?.toUpperCase(),
|
||||||
cancelTitle: cancelTitle?.toUpperCase(),
|
cancelTitle: cancelTitle?.toUpperCase(),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user