getSource static method

Source getSource(
  1. String url, {
  2. bool isFile = false,
})

Implementation

static Source getSource(String url, {bool isFile = false}) {
  if (url.contains('http')) return UrlSource(url);
  if (isFile) {
    return DeviceFileSource(url);
  }
  return AssetSource(url);
}