basename property Null safety

String basename

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

String get basename;