Importing

With User Interface (withGUI)

FMTC.instance.rootDirectory.import.withGUI(
    fileExtension: String,
    emptyCacheBeforePicking: bool,
);

To display a file/archive selection screen/popup to the user using the platform specific picker, use this method. Multiple files can be selected at once, and each will be imported simultaneously.

Specifying fileExtension will attempt to limit the type of files that can be selected (defaulting to '.fmtc'). Note that this is not supported on every platform, and it will fallback to allowing any type of file to be chosen, but only files ending in the extension will be imported.

Disabling emptyCacheBeforePicking is not recommended (true by default). It dictates whether a cached version of the chosen file should be imported or not.

It returns a mapping of the name of the store to its success state (a Future which will resolve to a boolean flag).

With A Known File (manual)

FMTC.instance.rootDirectory.import.manual(File('inputFilePath.fmtc'));

To import a store from a known file/archive, use this method.

It returns its success state (a Future which will resolve to a boolean flag).

Last updated

© Luka Stillingfleet (JaffaKetchup)