extension property

String get extension

The file extension of path: the portion of its "basename" from the last . to the end, including the . itself.

Implementation

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