saveFileName property

String get saveFileName

Returns the file name to be used for saving, including the extension.

Implementation

String get saveFileName {
  String? extensionName = fileName.split(".").lastOrNull;
  try {
    Uri uri = fileName.toSafeUri();
    if (uri.pathSegments.isNotEmpty) {
      extensionName = uri.pathSegments.last.split(".").lastOrNull;
    }
  } catch (e) {
    logD("Uri parse error: $fileName");
  }
  return '${matchUrl}.$extensionName';
}