launch method

Future<void> launch(
  1. String source
)

auto choose file and url

is supported url,pdf,video

Implementation

Future<void> launch(String source) async {
  if (source.isEmpty) throw Exception('`source` is empty');
  if (source.startsWith('http')) {
    // url
    await launchUrl(source);
  } else {
    //file
    await launchFile(source);
  }
}