getAsEntry method Null safety

Entry getAsEntry ()

Implementation

Entry getAsEntry() {
  Entry entry = _webkitGetAsEntry() as Entry;

  if (entry.isFile)
    applyExtension('FileEntry', entry);
  else if (entry.isDirectory)
    applyExtension('DirectoryEntry', entry);
  else
    applyExtension('Entry', entry);

  return entry;
}