Skip to content

DirectoryLocation custom class #46

@panalgin

Description

@panalgin

Hello,

How can we instantiniate DirectoryLocation object? Because I would like to manually set a location if the user does not select a folder to save to. In this case, I can't seem to find a constructor function for DirectoryLocation and it is not castable from "Directory" class of dart:io

DirectoryLocation? pickedDirectory =
        await FlutterFileDialog.pickDirectory();

    pickedDirectory ??=
        (await getApplicationDocumentsDirectory()) as DirectoryLocation;

The above cast does not work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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