The file extension of path: the portion of its "basename" from the last . to the end, including the . itself.
.
String get extension => p.extension(path);