forked from crazecoder/open_file
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df05487
commit 023cd12
Showing
9 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
library open_file; | ||
|
||
export 'src/open_file.dart'; | ||
export 'src/plaform/open_file.dart' | ||
if (dart.library.html) 'src/web/open_file.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import 'dart:async'; | ||
import 'web.dart' as web; | ||
|
||
class OpenFile { | ||
static Future<String> open(String filePath) async { | ||
bool _b = await web.open("file://$filePath"); | ||
return _b ? "done" : "there are some errors when open $filePath"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'dart:async'; | ||
import 'dart:html'; | ||
|
||
Future<bool> open(String uri) async { | ||
try{ | ||
Entry _e = await window.resolveLocalFileSystemUrl(uri); | ||
return _e != null; | ||
}catch (e){ | ||
print(e); | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
name: open_file | ||
description: A plug-in that can call native APP to open files with string result in flutter,support iOS(UTI) and android(intent) | ||
version: 2.0.2 | ||
version: 2.1.0 | ||
author: crazecoder <[email protected]> | ||
homepage: https://github.com/crazecoder/open_file | ||
|
||
|
||
dependencies: | ||
flutter: | ||
sdk: flutter | ||
ffi: ^0.1.3 | ||
|
||
environment: | ||
sdk: ">=2.0.0-dev.28.0 <3.0.0" | ||
sdk: ">=2.1.0 <3.0.0" | ||
# For information on the generic Dart part of this file, see the | ||
# following page: https://www.dartlang.org/tools/pub/pubspec | ||
|
||
|