basename property

String basename
override

Gets the part of this entity's path after the last separator.

context.basename('path/to/foo.dart'); // -> 'foo.dart'
context.basename('path/to');          // -> 'to'

Trailing separators are ignored.

context.basename('path/to/'); // -> 'to'

Implementation

@override
String get basename => fileSystem.path.basename(path);