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:
|
||||
CARGO_TERM_COLOR: always
|
||||
FLUTTER_VERSION: "3.10.4"
|
||||
FLUTTER_VERSION: "3.13.9"
|
||||
RUST_TOOLCHAIN: "1.70"
|
||||
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/**"
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.10.1"
|
||||
FLUTTER_VERSION: "3.13.9"
|
||||
RUST_TOOLCHAIN: "1.70"
|
||||
|
||||
concurrency:
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
- "*"
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.10.1"
|
||||
FLUTTER_VERSION: "3.13.9"
|
||||
RUST_TOOLCHAIN: "1.70"
|
||||
|
||||
jobs:
|
||||
|
2
.github/workflows/rust_coverage.yml
vendored
2
.github/workflows/rust_coverage.yml
vendored
@ -11,7 +11,7 @@ on:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
FLUTTER_VERSION: "3.10.1"
|
||||
FLUTTER_VERSION: "3.13.9"
|
||||
RUST_TOOLCHAIN: "1.70"
|
||||
|
||||
jobs:
|
||||
|
@ -1,7 +1,7 @@
|
||||
<h1 align="center" style="margin:0"> AppFlowy_Flutter</h1>
|
||||
<div align="center">
|
||||
<img src="https://img.shields.io/badge/Flutter-v3.10.1-blue"/>
|
||||
<img src="https://img.shields.io/badge/Rust-v1.65-orange"/>
|
||||
<img src="https://img.shields.io/badge/Flutter-v3.13.19-blue"/>
|
||||
<img src="https://img.shields.io/badge/Rust-v1.70-orange"/>
|
||||
</div>
|
||||
|
||||
> Documentation for Contributors
|
||||
|
@ -34,7 +34,7 @@ void main() {
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
false,
|
||||
];
|
||||
for (final (index, content) in checkboxCells.indexed) {
|
||||
await tester.assertCheckboxCell(
|
||||
@ -54,7 +54,7 @@ void main() {
|
||||
'10',
|
||||
'11',
|
||||
'12',
|
||||
''
|
||||
'',
|
||||
];
|
||||
for (final (index, content) in numberCells.indexed) {
|
||||
await tester.assertCellContent(
|
||||
@ -152,7 +152,7 @@ void main() {
|
||||
'Jun 16, 2023',
|
||||
'',
|
||||
'',
|
||||
''
|
||||
'',
|
||||
];
|
||||
for (final (index, content) in dateCells.indexed) {
|
||||
await tester.assertDateCellInGrid(
|
||||
|
@ -219,7 +219,7 @@ void main() {
|
||||
expect(node.delta!.toJson(), [
|
||||
{
|
||||
'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_backend/protobuf/flowy-folder2/view.pb.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:emoji_mart/emoji_mart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||
import 'package:flutter_test/flutter_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_editor/appflowy_editor.dart' hide Log;
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:emoji_mart/emoji_mart.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||
import 'package:flutter_test/flutter_test.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 'base.dart';
|
||||
|
@ -15,7 +15,7 @@ class MyMockClient extends Mock implements http.Client {
|
||||
if (requestType == 'POST' &&
|
||||
requestUri == OpenAIRequestType.textCompletion.uri) {
|
||||
final responseHeaders = <String, String>{
|
||||
'content-type': 'text/event-stream'
|
||||
'content-type': 'text/event-stream',
|
||||
};
|
||||
final responseBody = Stream.fromIterable([
|
||||
utf8.encode(
|
||||
|
@ -171,7 +171,7 @@ SPEC CHECKSUMS:
|
||||
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
|
||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
||||
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
|
||||
flowy_infra_ui: 0455e1fa8c51885aa1437848e361e99419f34ebc
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
|
||||
|
@ -143,7 +143,7 @@
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
LastUpgradeCheck = 1430;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -98,7 +98,7 @@ class MobileViewItemBottomSheetBody extends StatelessWidget {
|
||||
? MobileViewItemBottomSheetBodyAction.removeFromFavorites
|
||||
: MobileViewItemBottomSheetBodyAction.addToFavorites,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ class MobileViewItemBottomSheetHeader extends StatelessWidget {
|
||||
onPressed: () {
|
||||
context.pop();
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ class DetailsPlaceholderScreenState extends State<DetailsPlaceholderScreen> {
|
||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
|
||||
),
|
||||
),
|
||||
]
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -34,7 +34,7 @@ class MobileFavoritePageFolder extends StatelessWidget {
|
||||
),
|
||||
BlocProvider(
|
||||
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
||||
)
|
||||
),
|
||||
],
|
||||
child: MultiBlocListener(
|
||||
listeners: [
|
||||
|
@ -34,7 +34,7 @@ class MobileFolders extends StatelessWidget {
|
||||
),
|
||||
BlocProvider(
|
||||
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
||||
)
|
||||
),
|
||||
],
|
||||
child: MultiBlocListener(
|
||||
listeners: [
|
||||
|
@ -66,7 +66,7 @@ class MobileHomePageHeader extends StatelessWidget {
|
||||
icon: const Icon(
|
||||
Icons.arrow_drop_down,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
FlowyText.regular(
|
||||
@ -76,7 +76,7 @@ class MobileHomePageHeader extends StatelessWidget {
|
||||
fontSize: 12,
|
||||
color: theme.colorScheme.onSurface,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -87,7 +87,7 @@ class MobileHomePageHeader extends StatelessWidget {
|
||||
icon: const FlowySvg(
|
||||
FlowySvgs.m_setting_m,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -51,7 +51,7 @@ class MobileHomeTrashPage extends StatelessWidget {
|
||||
trashBloc: trashBloc,
|
||||
type: _TrashActionType.restoreAll,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -214,7 +214,7 @@ class _DeletedFilesListView extends StatelessWidget {
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
);
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -64,7 +64,7 @@ class MobilePersonalFolder extends StatelessWidget {
|
||||
MobilePaneActionType.more,
|
||||
]),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -48,7 +48,7 @@ class _MobileRecentFolderState extends State<MobileRecentFolder> {
|
||||
// the recent views are in reverse order
|
||||
recentViews: recentViews,
|
||||
),
|
||||
const VSpace(12.0)
|
||||
const VSpace(12.0),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -312,7 +312,7 @@ class _SingleMobileInnerViewItemState extends State<SingleMobileInnerViewItem> {
|
||||
fontSize: 18.0,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
// hover action
|
||||
|
@ -40,7 +40,7 @@ class _AppearanceSettingGroupState extends State<AppearanceSettingGroup> {
|
||||
color: theme.colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
const Icon(Icons.chevron_right)
|
||||
const Icon(Icons.chevron_right),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
|
@ -71,7 +71,7 @@ class _EditUsernameBottomSheetState extends State<EditUsernameBottomSheet> {
|
||||
onPressed: () {
|
||||
widget.context.pop();
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
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: () {
|
||||
context.pop();
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
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_skin_tone.dart';
|
||||
import 'package:emoji_mart/emoji_mart.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.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.
|
||||
EmojiData? _cachedEmojiData;
|
||||
|
@ -1,7 +1,7 @@
|
||||
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:flutter/material.dart';
|
||||
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||
|
||||
class FlowyEmojiHeader extends StatelessWidget {
|
||||
const FlowyEmojiHeader({
|
||||
|
@ -1,6 +1,6 @@
|
||||
import 'package:appflowy/generated/locale_keys.g.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 {
|
||||
@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_editor/appflowy_editor.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/widget/flowy_tooltip.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_emoji_mart/flutter_emoji_mart.dart';
|
||||
|
||||
typedef EmojiKeywordChangedCallback = void Function(String keyword);
|
||||
typedef EmojiSkinToneChanged = void Function(EmojiSkinTone skinTone);
|
||||
|
@ -1,10 +1,10 @@
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy_popover/appflowy_popover.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/widget/flowy_tooltip.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
|
||||
EmojiSkinTone? lastSelectedEmojiSkinTone;
|
||||
|
@ -111,7 +111,7 @@ class _FlowyIconPickerState extends State<FlowyIconPicker>
|
||||
LocaleKeys.emoji_emojiTab.tr(),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -219,7 +219,7 @@ class CellController<T, D> extends Equatable {
|
||||
@override
|
||||
List<Object> get props => [
|
||||
_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 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));
|
||||
|
@ -100,7 +100,7 @@ class RowList {
|
||||
final List<RowInfo> newRows = [];
|
||||
final DeletedIndexs deletedIndex = [];
|
||||
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) {
|
||||
|
@ -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_view.dart';
|
||||
import 'package:appflowy/workspace/application/view/prelude.dart';
|
||||
import 'package:appflowy/workspace/application/view/view_ext.dart';
|
||||
import 'package:appflowy_backend/log.dart';
|
||||
@ -65,7 +65,8 @@ class DatabaseTabBarBloc
|
||||
if (updatePB.createChildViews.isNotEmpty) {
|
||||
final allTabBars = [
|
||||
...state.tabBars,
|
||||
...updatePB.createChildViews.map((e) => DatabaseTabBar(view: e))
|
||||
...updatePB.createChildViews
|
||||
.map((e) => DatabaseTabBar(view: e)),
|
||||
];
|
||||
emit(
|
||||
state.copyWith(
|
||||
@ -80,7 +81,7 @@ class DatabaseTabBarBloc
|
||||
if (updatePB.deleteChildViews.isNotEmpty) {
|
||||
final allTabBars = [...state.tabBars];
|
||||
final tabBarControllerByViewId = {
|
||||
...state.tabBarControllerByViewId
|
||||
...state.tabBarControllerByViewId,
|
||||
};
|
||||
var newSelectedIndex = state.selectedIndex;
|
||||
for (final viewId in updatePB.deleteChildViews) {
|
||||
@ -235,7 +236,7 @@ class DatabaseTabBarState with _$DatabaseTabBarState {
|
||||
tabBarControllerByViewId: {
|
||||
view.id: DatabaseTabBarController(
|
||||
view: view,
|
||||
)
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ class _BoardColumnHeaderState extends State<BoardColumnHeader> {
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -431,7 +431,7 @@ class HiddenGroupPopupItemList extends StatelessWidget {
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
return ListView.separated(
|
||||
|
@ -283,7 +283,7 @@ class CalendarBloc extends Bloc<CalendarEvent, CalendarState> {
|
||||
return;
|
||||
}
|
||||
fieldInfoByFieldId = {
|
||||
for (var fieldInfo in fieldInfos) fieldInfo.field.id: fieldInfo
|
||||
for (final fieldInfo in fieldInfos) fieldInfo.field.id: fieldInfo,
|
||||
};
|
||||
},
|
||||
onRowsCreated: (rowIds) async {
|
||||
|
@ -230,7 +230,7 @@ class _EventCardState extends State<EventCard> {
|
||||
color: Theme.of(context).hintColor,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -435,7 +435,7 @@ class UnscheduleEventsList extends StatelessWidget {
|
||||
PopoverContainer.of(context).close();
|
||||
},
|
||||
),
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
return ListView.separated(
|
||||
|
@ -50,7 +50,7 @@ class FieldTypeOptionEditor extends StatelessWidget {
|
||||
|
||||
final List<Widget> children = [
|
||||
SwitchFieldButton(popoverMutex: popoverMutex),
|
||||
if (typeOptionWidget != null) typeOptionWidget
|
||||
if (typeOptionWidget != null) typeOptionWidget,
|
||||
];
|
||||
|
||||
return ListView(
|
||||
|
@ -48,7 +48,7 @@ class SelectOptionTypeOptionWidget extends StatelessWidget {
|
||||
const VSpace(10),
|
||||
if (state.options.isEmpty && !state.isEditingOption)
|
||||
const _AddOptionButton(),
|
||||
_OptionList(popoverMutex: popoverMutex)
|
||||
_OptionList(popoverMutex: popoverMutex),
|
||||
];
|
||||
|
||||
return ListView.builder(
|
||||
@ -77,7 +77,7 @@ class OptionTitle extends StatelessWidget {
|
||||
child: FlowyText.medium(
|
||||
LocaleKeys.grid_field_optionTitle.tr(),
|
||||
),
|
||||
)
|
||||
),
|
||||
];
|
||||
if (state.options.isNotEmpty && !state.isEditingOption) {
|
||||
children.add(const Spacer());
|
||||
|
@ -19,7 +19,7 @@ class GridShortcuts extends StatelessWidget {
|
||||
}
|
||||
|
||||
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() {
|
||||
|
@ -123,7 +123,7 @@ class SelectOptionTag extends StatelessWidget {
|
||||
FlowySvgs.close_s,
|
||||
),
|
||||
),
|
||||
]
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -126,7 +126,7 @@ class _GridTextCellState extends GridEditableTextCell<GridTextCell> {
|
||||
isDense: true,
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -265,13 +265,17 @@ class _AppFlowyEditorPageState extends State<AppFlowyEditorPage> {
|
||||
child: MobileFloatingToolbar(
|
||||
editorState: editorState,
|
||||
editorScrollController: editorScrollController,
|
||||
toolbarBuilder: (context, anchor) {
|
||||
toolbarBuilder: (context, anchor, closeToolbar) {
|
||||
return AdaptiveTextSelectionToolbar.editable(
|
||||
clipboardStatus: ClipboardStatus.pasteable,
|
||||
onCopy: () => copyCommand.execute(editorState),
|
||||
onCopy: () {
|
||||
copyCommand.execute(editorState);
|
||||
closeToolbar();
|
||||
},
|
||||
onCut: () => cutCommand.execute(editorState),
|
||||
onPaste: () => pasteCommand.execute(editorState),
|
||||
onSelectAll: () => selectAllCommand.execute(editorState),
|
||||
onLiveTextInput: null,
|
||||
anchors: TextSelectionToolbarAnchors(
|
||||
primaryAnchor: anchor,
|
||||
),
|
||||
|
@ -79,7 +79,7 @@ class BlockOptionButton extends StatelessWidget {
|
||||
),
|
||||
TextSpan(
|
||||
text: LocaleKeys.document_plugins_optionAction_toOpenMenu.tr(),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
|
@ -170,7 +170,7 @@ class _BuiltInPageWidgetState extends State<BuiltInPageWidget> {
|
||||
}
|
||||
controller.close();
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ extension InsertDatabase on EditorState {
|
||||
MentionBlockKeys.mention: {
|
||||
MentionBlockKeys.type: MentionType.page.name,
|
||||
MentionBlockKeys.pageId: view.id,
|
||||
}
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -44,13 +44,15 @@ void showLinkToPageMenu(
|
||||
await editorState.insertReferencePage(viewPB, pageType);
|
||||
linkToPageMenuEntry.remove();
|
||||
} on FlowyError catch (e) {
|
||||
Dialogs.show(
|
||||
child: FlowyErrorPage.message(
|
||||
e.msg,
|
||||
howToFix: LocaleKeys.errorDialog_howToFixFallback.tr(),
|
||||
),
|
||||
context,
|
||||
);
|
||||
if (context.mounted) {
|
||||
Dialogs.show(
|
||||
child: FlowyErrorPage.message(
|
||||
e.msg,
|
||||
howToFix: LocaleKeys.errorDialog_howToFixFallback.tr(),
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
@ -149,7 +151,7 @@ class _LinkToPageMenuState extends State<LinkToPageMenu> {
|
||||
LogicalKeyboardKey.arrowUp,
|
||||
LogicalKeyboardKey.arrowDown,
|
||||
LogicalKeyboardKey.tab,
|
||||
LogicalKeyboardKey.enter
|
||||
LogicalKeyboardKey.enter,
|
||||
];
|
||||
|
||||
if (!acceptedKeys.contains(event.logicalKey)) {
|
||||
|
@ -119,7 +119,7 @@ extension PasteNodes on EditorState {
|
||||
if (nodes.last.children.isNotEmpty) {
|
||||
return [
|
||||
...path,
|
||||
...calculatePath([0], nodes.last.children.toList())
|
||||
...calculatePath([0], nodes.last.children.toList()),
|
||||
];
|
||||
}
|
||||
return path;
|
||||
|
@ -19,7 +19,7 @@ const String kLocalImagesKey = 'local_images';
|
||||
|
||||
List<String> get builtInAssetImages => [
|
||||
"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 {
|
||||
|
@ -102,7 +102,7 @@ class ChangeCoverPopoverBloc
|
||||
transaction.updateNode(node, {
|
||||
DocumentHeaderBlockKeys.coverType: CoverType.none.toString(),
|
||||
DocumentHeaderBlockKeys.icon:
|
||||
node.attributes[DocumentHeaderBlockKeys.icon]
|
||||
node.attributes[DocumentHeaderBlockKeys.icon],
|
||||
});
|
||||
return editorState.apply(transaction);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ class _NetworkImageUrlInputState extends State<NetworkImageUrlInput> {
|
||||
title: LocaleKeys.document_plugins_cover_add.tr(),
|
||||
borderRadius: Corners.s8Border,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -322,7 +322,7 @@ class _CoverImagePreviewWidgetState extends State<CoverImagePreviewWidget> {
|
||||
(l) => _buildImageDeleteButton(context),
|
||||
(r) => Container(),
|
||||
)
|
||||
: Container()
|
||||
: Container(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ class _DocumentHeaderNodeWidgetState extends State<DocumentHeaderNodeWidget> {
|
||||
DocumentHeaderBlockKeys.coverDetails:
|
||||
widget.node.attributes[DocumentHeaderBlockKeys.coverDetails],
|
||||
DocumentHeaderBlockKeys.icon:
|
||||
widget.node.attributes[DocumentHeaderBlockKeys.icon]
|
||||
widget.node.attributes[DocumentHeaderBlockKeys.icon],
|
||||
};
|
||||
if (cover != null) {
|
||||
attributes[DocumentHeaderBlockKeys.coverType] = cover.$1.toString();
|
||||
@ -398,7 +398,7 @@ class DocumentCoverState extends State<DocumentCover> {
|
||||
width: double.infinity,
|
||||
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.type: MentionType.date.name,
|
||||
MentionBlockKeys.date: DateTime.now().toIso8601String(),
|
||||
}
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -157,7 +157,7 @@ class _AutoCompletionBlockComponentState
|
||||
onKeep: _onExit,
|
||||
onRewrite: _onRewrite,
|
||||
onDiscard: _onDiscard,
|
||||
)
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
@ -477,7 +477,7 @@ class AutoCompletionHeader extends StatelessWidget {
|
||||
onTap: () async {
|
||||
await openLearnMorePage();
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ class Loading {
|
||||
children: [
|
||||
Center(
|
||||
child: CircularProgressIndicator(),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -254,7 +254,7 @@ class _SmartEditInputWidgetState extends State<SmartEditInputWidget> {
|
||||
onTap: () async {
|
||||
await openLearnMorePage();
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ class EditorStyleCustomizer {
|
||||
fontSize + 8,
|
||||
fontSize + 4,
|
||||
fontSize + 2,
|
||||
fontSize
|
||||
fontSize,
|
||||
];
|
||||
return TextStyle(
|
||||
fontSize: fontSizes.elementAtOrNull(level - 1) ?? fontSize,
|
||||
|
@ -31,7 +31,7 @@ class ExportPageWidget extends StatelessWidget {
|
||||
width: 100,
|
||||
height: 30,
|
||||
onPressed: onTap,
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class DocumentMoreButton extends StatelessWidget {
|
||||
BlocProvider.value(
|
||||
value: context.read<DocumentAppearanceCubit>(),
|
||||
child: const FontSizeSwitcher(),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -124,7 +124,7 @@ class DateReferenceService {
|
||||
MentionBlockKeys.mention: {
|
||||
MentionBlockKeys.type: MentionType.date.name,
|
||||
MentionBlockKeys.date: date.toIso8601String(),
|
||||
}
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -109,7 +109,7 @@ class InlinePageReferenceService {
|
||||
MentionBlockKeys.mention: {
|
||||
MentionBlockKeys.type: MentionType.page.name,
|
||||
MentionBlockKeys.pageId: view.id,
|
||||
}
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -150,7 +150,7 @@ class ReminderReferenceService {
|
||||
MentionBlockKeys.type: MentionType.reminder.name,
|
||||
MentionBlockKeys.date: date.toIso8601String(),
|
||||
MentionBlockKeys.uid: reminder.id,
|
||||
}
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -226,7 +226,7 @@ class _InlineActionsHandlerState extends State<InlineActionsHandler> {
|
||||
![
|
||||
...moveKeys,
|
||||
LogicalKeyboardKey.arrowLeft,
|
||||
LogicalKeyboardKey.arrowRight
|
||||
LogicalKeyboardKey.arrowRight,
|
||||
].contains(event.logicalKey)) {
|
||||
/// Prevents dismissal of context menu by notifying the parent
|
||||
/// that the selection change occurred from the handler.
|
||||
|
@ -110,7 +110,7 @@ class _TrashPageState extends State<TrashPage> {
|
||||
onTap: () =>
|
||||
context.read<TrashBloc>().add(const TrashEvent.deleteAll()),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -75,7 +75,7 @@ class FlowyRunner {
|
||||
InitSupabaseTask(),
|
||||
InitAppFlowyCloudTask(),
|
||||
const InitAppWidgetTask(),
|
||||
const InitPlatformServiceTask()
|
||||
const InitPlatformServiceTask(),
|
||||
],
|
||||
],
|
||||
);
|
||||
|
@ -100,7 +100,7 @@ class AFCloudAuthService implements AuthService {
|
||||
authType: AuthTypePB.AFCloud,
|
||||
map: {
|
||||
AuthServiceMapKeys.signInURL: uri.toString(),
|
||||
AuthServiceMapKeys.deviceId: deviceId
|
||||
AuthServiceMapKeys.deviceId: deviceId,
|
||||
},
|
||||
);
|
||||
final result = await UserEventOauthSignIn(payload)
|
||||
|
@ -97,7 +97,7 @@ class SupabaseAuthService implements AuthService {
|
||||
map: {
|
||||
AuthServiceMapKeys.uuid: userId,
|
||||
AuthServiceMapKeys.email: userEmail,
|
||||
AuthServiceMapKeys.deviceId: await getDeviceId()
|
||||
AuthServiceMapKeys.deviceId: await getDeviceId(),
|
||||
},
|
||||
);
|
||||
},
|
||||
@ -140,7 +140,7 @@ class SupabaseAuthService implements AuthService {
|
||||
map: {
|
||||
AuthServiceMapKeys.uuid: userId,
|
||||
AuthServiceMapKeys.email: userEmail,
|
||||
AuthServiceMapKeys.deviceId: await getDeviceId()
|
||||
AuthServiceMapKeys.deviceId: await getDeviceId(),
|
||||
},
|
||||
);
|
||||
},
|
||||
|
@ -61,7 +61,7 @@ class MockAuthService implements AuthService {
|
||||
map: {
|
||||
AuthServiceMapKeys.uuid: uuid,
|
||||
AuthServiceMapKeys.email: email,
|
||||
AuthServiceMapKeys.deviceId: 'MockDeviceId'
|
||||
AuthServiceMapKeys.deviceId: 'MockDeviceId',
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -48,7 +48,7 @@ class HistoricalUserList extends StatelessWidget {
|
||||
},
|
||||
itemCount: state.historicalUsers.length,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class SignUpForm extends StatelessWidget {
|
||||
if (context.read<SignUpBloc>().state.isSubmitting) ...[
|
||||
const SizedBox(height: 8),
|
||||
const LinearProgressIndicator(value: null),
|
||||
]
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -129,7 +129,7 @@ class WorkspaceErrorDescription extends StatelessWidget {
|
||||
"Error code: ${state.initialError.code.value.toString()}",
|
||||
fontSize: 12,
|
||||
maxLines: 1,
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -185,7 +185,7 @@ class CreateFolderWidgetState extends State<CreateFolderWidget> {
|
||||
}
|
||||
},
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ class FavoriteFolder extends StatelessWidget {
|
||||
onTertiarySelected: (view) =>
|
||||
context.read<TabsBloc>().openTab(view),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -62,7 +62,7 @@ class PersonalFolder extends StatelessWidget {
|
||||
onTertiarySelected: (view) =>
|
||||
context.read<TabsBloc>().openTab(view),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
@ -136,7 +136,7 @@ class _PersonalFolderHeaderState extends State<PersonalFolderHeader> {
|
||||
);
|
||||
},
|
||||
),
|
||||
]
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -51,7 +51,7 @@ class HomeSideBar extends StatelessWidget {
|
||||
),
|
||||
BlocProvider(
|
||||
create: (_) => FavoriteBloc()..add(const FavoriteEvent.initial()),
|
||||
)
|
||||
),
|
||||
],
|
||||
child: MultiBlocListener(
|
||||
listeners: [
|
||||
|
@ -324,7 +324,7 @@ class _SingleInnerViewItemState extends State<SingleInnerViewItem> {
|
||||
widget.view.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
)
|
||||
),
|
||||
];
|
||||
|
||||
// hover action
|
||||
|
@ -76,7 +76,7 @@ class SettingsDialog extends StatelessWidget {
|
||||
context.read<SettingsDialogBloc>().state.page,
|
||||
context.read<SettingsDialogBloc>().state.userProfile,
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -373,7 +373,7 @@ final Map<String, String> smileys = Map.fromIterables([
|
||||
'Rescue Worker’s Helmet',
|
||||
'Lipstick',
|
||||
'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]
|
||||
@ -919,7 +919,7 @@ final Map<String, String> animals = Map.fromIterables([
|
||||
'Christmas Tree',
|
||||
'Sparkles',
|
||||
'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]
|
||||
@ -1210,7 +1210,7 @@ final Map<String, String> foods = Map.fromIterables([
|
||||
'Chopsticks',
|
||||
'Fork and Knife With Plate',
|
||||
'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]
|
||||
@ -1445,7 +1445,7 @@ final Map<String, String> travel = Map.fromIterables([
|
||||
'Passport Control',
|
||||
'Customs',
|
||||
'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]
|
||||
@ -1667,7 +1667,7 @@ final Map<String, String> activities = Map.fromIterables([
|
||||
'Violin',
|
||||
'Drum',
|
||||
'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]
|
||||
@ -1962,7 +1962,7 @@ final Map<String, String> objects = Map.fromIterables([
|
||||
'Coffin',
|
||||
'Funeral Urn',
|
||||
'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]
|
||||
@ -2424,7 +2424,7 @@ final Map<String, String> symbols = Map.fromIterables([
|
||||
'Red Triangle Pointed Down',
|
||||
'Diamond With a Dot',
|
||||
'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]
|
||||
@ -2953,7 +2953,7 @@ final Map<String, String> flags = Map.fromIterables([
|
||||
'Flag: Mayotte',
|
||||
'Flag: South Africa',
|
||||
'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(
|
||||
EmojiCategory.FLAGS,
|
||||
await _getAvailableEmojis(emoji_list.flags, title: 'flags'),
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ class SettingThirdPartyLogin extends StatelessWidget {
|
||||
fontSize: 16,
|
||||
),
|
||||
const HSpace(6),
|
||||
indicator
|
||||
indicator,
|
||||
],
|
||||
),
|
||||
const VSpace(6),
|
||||
|
@ -122,7 +122,7 @@ class ColorSchemeUploadPopover extends StatelessWidget {
|
||||
false,
|
||||
),
|
||||
)
|
||||
.toList()
|
||||
.toList(),
|
||||
],
|
||||
],
|
||||
),
|
||||
@ -168,7 +168,7 @@ class ColorSchemeUploadPopover extends StatelessWidget {
|
||||
width: 20,
|
||||
onPressed: () =>
|
||||
bloc.add(DynamicPluginEvent.removePlugin(name: theme)),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -34,7 +34,7 @@ class LayoutDirectionSetting extends StatelessWidget {
|
||||
_layoutDirectionItemButton(context, LayoutDirection.rtlLayout),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
@ -98,7 +98,7 @@ class TextDirectionSetting extends StatelessWidget {
|
||||
_textDirectionItemButton(context, AppFlowyTextDirection.auto),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
|
@ -45,7 +45,7 @@ class _ThemeFontFamilySettingState extends State<ThemeFontFamilySetting> {
|
||||
trailing: [
|
||||
FontFamilyDropDown(
|
||||
currentFontFamily: widget.currentFontFamily,
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -127,12 +127,12 @@ class ShortcutsListTile extends StatelessWidget {
|
||||
onPressed: () {
|
||||
showKeyListenerDialog(context);
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
Divider(
|
||||
color: Theme.of(context).dividerColor,
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -2,18 +2,19 @@ import 'dart:io';
|
||||
|
||||
import 'package:appflowy/generated/flowy_svgs.g.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: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/widget/buttons/secondary_button.dart';
|
||||
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.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:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../../../generated/locale_keys.g.dart';
|
||||
import '../../../../startup/launch_configuration.dart';
|
||||
import '../../../../startup/startup.dart';
|
||||
@ -172,7 +173,10 @@ class _ChangeStoragePathButtonState extends State<_ChangeStoragePathButton> {
|
||||
onPressed: () async {
|
||||
// pick the new directory and reload app
|
||||
final path = await getIt<FilePickerService>().getDirectoryPath();
|
||||
if (path == null || !mounted || widget.usingPath == path) {
|
||||
if (path == null || widget.usingPath == path) {
|
||||
return;
|
||||
}
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
await context.read<SettingsLocationCubit>().setCustomPath(path);
|
||||
@ -245,7 +249,10 @@ class _RecoverDefaultStorageButtonState
|
||||
// reset to the default directory and reload app
|
||||
final directory = await appFlowyApplicationDataDirectory();
|
||||
final path = directory.path;
|
||||
if (!mounted || widget.usingPath == path) {
|
||||
if (widget.usingPath == path) {
|
||||
return;
|
||||
}
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
await context
|
||||
|
@ -2,21 +2,22 @@ import 'dart:io';
|
||||
|
||||
import 'package:appflowy/startup/startup.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/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/protobuf/flowy-error/errors.pbserver.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: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: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_bloc/flutter_bloc.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
import '../../../../generated/locale_keys.g.dart';
|
||||
|
||||
class FileExporterWidget extends StatefulWidget {
|
||||
@ -69,13 +70,13 @@ class _FileExporterWidgetState extends State<FileExporterWidget> {
|
||||
.selectOrDeselectAllItems();
|
||||
},
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
const VSpace(8),
|
||||
const Expanded(child: _ExpandedList()),
|
||||
const VSpace(8),
|
||||
_buildButtons()
|
||||
_buildButtons(),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -107,18 +108,20 @@ class _FileExporterWidgetState extends State<FileExporterWidget> {
|
||||
final views = cubit!.state.selectedViews;
|
||||
final result =
|
||||
await _AppFlowyFileExporter.exportToPath(exportPath, views);
|
||||
if (result.$1 && mounted) {
|
||||
// success
|
||||
showSnackBarMessage(
|
||||
context,
|
||||
LocaleKeys.settings_files_exportFileSuccess.tr(),
|
||||
);
|
||||
} else {
|
||||
showSnackBarMessage(
|
||||
context,
|
||||
LocaleKeys.settings_files_exportFileFail.tr() +
|
||||
result.$2.join('\n'),
|
||||
);
|
||||
if (mounted) {
|
||||
if (result.$1) {
|
||||
// success
|
||||
showSnackBarMessage(
|
||||
context,
|
||||
LocaleKeys.settings_files_exportFileSuccess.tr(),
|
||||
);
|
||||
} else {
|
||||
showSnackBarMessage(
|
||||
context,
|
||||
LocaleKeys.settings_files_exportFileFail.tr() +
|
||||
result.$2.join('\n'),
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
showSnackBarMessage(
|
||||
|
@ -16,7 +16,7 @@ class _SettingsFileSystemViewState extends State<SettingsFileSystemView> {
|
||||
late final _items = [
|
||||
const SettingsFileLocationCustomizer(),
|
||||
// disable export data for v0.2.0 in release mode.
|
||||
if (kDebugMode) const SettingsExportFileWidget()
|
||||
if (kDebugMode) const SettingsExportFileWidget(),
|
||||
];
|
||||
|
||||
@override
|
||||
|
@ -33,7 +33,7 @@ class SettingsNotificationsView extends StatelessWidget {
|
||||
.read<NotificationSettingsCubit>()
|
||||
.toggleNotificationsEnabled();
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@ -56,7 +56,7 @@ class SettingsUserView extends StatelessWidget {
|
||||
_buildUserIconSetting(context),
|
||||
if (isCloudEnabled && user.authType != AuthTypePB.Local) ...[
|
||||
const VSpace(12),
|
||||
UserEmailInput(user.email)
|
||||
UserEmailInput(user.email),
|
||||
],
|
||||
const VSpace(12),
|
||||
_renderCurrentOpenaiKey(context),
|
||||
|
@ -87,7 +87,7 @@ class EnableEncrypt extends StatelessWidget {
|
||||
.add(CloudSettingEvent.enableEncrypt(value));
|
||||
},
|
||||
value: state.config.enableEncrypt,
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
@ -128,7 +128,7 @@ class EnableEncrypt extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
@ -154,7 +154,7 @@ class EnableSync extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
value: state.config.enableSync,
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -88,7 +88,7 @@ class _NavigatorTextFieldDialogState extends State<NavigatorTextFieldDialog> {
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -149,8 +149,8 @@ class _CreateFlowyAlertDialog extends State<NavigatorAlertDialog> {
|
||||
widget.cancel?.call();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
)
|
||||
]
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -209,7 +209,7 @@ class NavigatorOkCancelDialog extends StatelessWidget {
|
||||
},
|
||||
okTitle: okTitle?.toUpperCase(),
|
||||
cancelTitle: cancelTitle?.toUpperCase(),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user