isFile method Null safety

Future<bool> isFile (
  1. String path
)

Whether path refers to a file.

Checks whether type(path) returns FileSystemEntityType.file.

Implementation

static Future<bool> isFile(String path) => _getType(_toUtf8Array(path), true)
    .then((type) => (type == FileSystemEntityType.file));