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;
}
Inheritance

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

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
success bool
no setter

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.