mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 01:50:30 +00:00
fix: android file open
This commit is contained in:
1 parent
2f2393ac20
commit
2d4bdea5cb
4 files changed
+36
-42
No files matched your search
@@ -41,10 +41,8 @@ class ExtensionView extends GetView<ExtensionController> {
|
||||
children: [
|
||||
TextButton.icon(
|
||||
onPressed: () {
|
||||
launchUrl(
|
||||
Uri.parse(
|
||||
'https://github.com/search?q=topic%3Agopeed-extension&type=repositories'),
|
||||
mode: LaunchMode.externalApplication);
|
||||
launchUrl(Uri.parse(
|
||||
'https://github.com/search?q=topic%3Agopeed-extension&type=repositories'));
|
||||
},
|
||||
icon: const Icon(Icons.search),
|
||||
label: Text('extensionFind'.tr),
|
||||
@@ -53,8 +51,7 @@ class ExtensionView extends GetView<ExtensionController> {
|
||||
TextButton.icon(
|
||||
onPressed: () {
|
||||
launchUrl(
|
||||
Uri.parse('https://docs.gopeed.com/dev-extension.html'),
|
||||
mode: LaunchMode.externalApplication);
|
||||
Uri.parse('https://docs.gopeed.com/dev-extension.html'));
|
||||
},
|
||||
icon: const Icon(Icons.edit),
|
||||
label: Text('extensionDevelop'.tr),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:open_file/open_file.dart';
|
||||
import 'package:open_filex/open_filex.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
@@ -67,7 +67,7 @@ class TaskFilesView extends GetView<TaskFilesController> {
|
||||
return ListTile(
|
||||
leading: file.isDirectory
|
||||
? const Icon(Icons.folder)
|
||||
: Icon(FaIcons.allIcons[findIcon(file.name)]),
|
||||
: Icon(FaIcons.allIcons[findIcon(fileName)]),
|
||||
title: Text(fileName),
|
||||
subtitle: file.isDirectory
|
||||
? Text('items'.trParams({
|
||||
@@ -105,8 +105,13 @@ class TaskFilesView extends GetView<TaskFilesController> {
|
||||
: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.play_circle),
|
||||
onPressed: () {
|
||||
OpenFile.open(filePath);
|
||||
onPressed: () async {
|
||||
print(filePath);
|
||||
try {
|
||||
await OpenFilex.open(filePath);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
}),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.share),
|
||||
|
||||
Reference in new issue
Block a user