Skip to content

path_provider getDownloadsDirectory documentation doesn't say when it might return null #143238

Description

@Hixie

The getDownloadsDirectory function is defined as potentially returning null. The documentation talks about it potentially throwing an UnsupportedError if this is not supported on the current platform, and talks about the returned Directory maybe not existing, but doesn't say when it might return null. So it's not clear if this is a failure mode that one should handle, or what to do when it happens.

https://pub.dev/documentation/path_provider/latest/path_provider/getDownloadsDirectory.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listp: path_providerPlugin that provides resolved paths to some platform directoriespackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions