extension property

String get extension

Gets the file extension of path: the portion of basename from the last . to the end (including the . itself).

Implementation

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