extension property

String get extension

The file extension of the asset, if it has one, including the ".".

Implementation

String get extension => p.extension(path);