mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-23 16:45:27 +01:00
new & opt.
- new: support suspend and WOL #172 - opt.: `execWithPwd` when cancel - opt.: extentions
This commit is contained in:
@@ -19,10 +19,10 @@ Future<bool> shareFiles(List<String> filePaths) async {
|
||||
} else {
|
||||
text = '${filePaths.length} ${l10n.files}';
|
||||
}
|
||||
Providers.app.moveBg = false;
|
||||
Pros.app.moveBg = false;
|
||||
// ignore: deprecated_member_use
|
||||
await Share.shareFiles(filePaths, subject: text);
|
||||
Providers.app.moveBg = true;
|
||||
Pros.app.moveBg = true;
|
||||
return filePaths.isNotEmpty;
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ void copy2Clipboard(String text) {
|
||||
}
|
||||
|
||||
Future<String?> pickOneFile() async {
|
||||
Providers.app.moveBg = false;
|
||||
Pros.app.moveBg = false;
|
||||
final result = await FilePicker.platform.pickFiles(type: FileType.any);
|
||||
Providers.app.moveBg = true;
|
||||
Pros.app.moveBg = true;
|
||||
return result?.files.single.path;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,10 @@ import 'package:toolbox/core/utils/platform/base.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'misc.dart';
|
||||
import '../extension/stringx.dart';
|
||||
import '../extension/uint8list.dart';
|
||||
|
||||
Future<bool> openUrl(String url) async {
|
||||
return await launchUrl(url.uri, mode: LaunchMode.externalApplication);
|
||||
return await launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
|
||||
}
|
||||
|
||||
void setTransparentNavigationBar(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user