viewFile function

Future<bool> viewFile(
  1. Uri uri, {
  2. String? chooserTitle,
})

View file at the given url using external app.

Returns true on success and false if there was no corresponding app to handle the url.

Note: currently this function is implemented only on android. Use the url_launcher package on other platforms in the meantime.

Implementation

Future<bool> viewFile(Uri uri, {String? chooserTitle}) => _channel
    .invokeMethod<bool>('viewFile', uri.toString())
    .then((result) => result ?? false);