|
1 | 1 | import 'package:appflowy/generated/locale_keys.g.dart'; |
2 | | -import 'package:appflowy/startup/startup.dart'; |
3 | 2 | import 'package:appflowy/plugins/document/application/share_bloc.dart'; |
| 3 | +import 'package:appflowy/startup/startup.dart'; |
| 4 | +import 'package:appflowy/util/string_extension.dart'; |
4 | 5 | import 'package:appflowy/workspace/application/view/view_listener.dart'; |
5 | 6 | import 'package:appflowy/workspace/presentation/home/toast.dart'; |
6 | 7 | import 'package:appflowy/workspace/presentation/widgets/pop_up_action.dart'; |
7 | 8 | import 'package:appflowy_backend/protobuf/flowy-document2/entities.pb.dart'; |
| 9 | +import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; |
| 10 | +import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart'; |
8 | 11 | import 'package:appflowy_popover/appflowy_popover.dart'; |
9 | 12 | import 'package:easy_localization/easy_localization.dart'; |
10 | 13 | import 'package:flowy_infra/file_picker/file_picker_service.dart'; |
11 | 14 | import 'package:flowy_infra_ui/widget/rounded_button.dart'; |
12 | | -import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; |
13 | | -import 'package:appflowy_backend/protobuf/flowy-folder2/view.pb.dart'; |
14 | 15 | import 'package:flutter/material.dart'; |
15 | 16 | import 'package:flutter_bloc/flutter_bloc.dart'; |
16 | 17 |
|
@@ -119,7 +120,7 @@ class ShareActionListState extends State<ShareActionList> { |
119 | 120 | final exportPath = await getIt<FilePickerService>().saveFile( |
120 | 121 | dialogTitle: '', |
121 | 122 | // encode the file name in case it contains special characters |
122 | | - fileName: '${Uri.encodeComponent(name)}.md', |
| 123 | + fileName: '${name.toFileName()}.md', |
123 | 124 | ); |
124 | 125 | if (exportPath != null) { |
125 | 126 | docShareBloc.add(DocShareEvent.shareMarkdown(exportPath)); |
|
0 commit comments