Exporting

With User Interface (withGUI)

FMTC.instance('storeName').export.withGUI(
    fileExtension: String,
    forceFilePicker: bool?,
    context: BuildContext?,
);

To display a file/archive selection screen/popup to the user using the platform specific picker, use this method.

On desktop platforms, this uses the save path selector dialog. On mobile platforms, this uses the share sheet/dialog.

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.

Specifying forceFilePicker is not recommended (null by default). This overrides the default platform check to decide which interface to use.

context must be specified when using the share sheet/dialog. Therefore, it is always recommended to specify it.

It returns a Future<void> which completes when the export is complete.

With A Known File (manual)

FMTC.instance('storeName').export.manual(File('outputFilePath.fmtc'));

To export a store to a known (non-existing) file/archive, use this method.

It returns a Future<void> which completes when the export is complete.

Last updated

© Luka Stillingfleet (JaffaKetchup)