extension property

String? get extension

Gets the file extension (without dot)

includeDot is a parameter used in QFileInfoUtils to determine whether the dot should be included in the extension.

Returns the file extension or null if not found

Example:

final file = File('/path/to/document.pdf');
print(file.extension); // "pdf"
print(file.extensionWithDot); // ".pdf"

Implementation

String? get extension => QFileInfoUtils.getExtension(path);