OpenDocumentFileResult enum
The result of openDocumentFileWithResult.
Use this enum to implement custom handles to all possible results of openDocumentFileWithResult.
e.g:
final result = documentFile.openDocumentFileWithResult(); // or openDocumentFileWithResult(documentFile)
switch (result) {
case OpenDocumentFileResult.launched:
// ....
break;
case OpenDocumentFileResult.failedDueActivityNotFound:
// No configured application for [documentFile.type]
break;
default:
// Unknown error
break;
}
Constructors
- OpenDocumentFileResult()
-
const
Values
- launched → const OpenDocumentFileResult
-
Successfully launched the target URI in a external application.
- failedDueActivityNotFound → const OpenDocumentFileResult
-
Could not launch URI because the device has no application that can handle the current URI/file type.
- failedDueSecurityPolicy → const OpenDocumentFileResult
-
Could not launch URI probably because:
- The application is running in a restricted environment such as Kid Mode in Android.
- Your application has no permission over the target URI.
- failedDueUnknownReason → const OpenDocumentFileResult
-
Could not launch URI probably due some IO exception, it's recommended to try again in this case.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
OpenDocumentFileResult> - A constant List of the values in this enum, in order of their declaration.