basename property

  1. @override
String basename
inherited

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 => p.basename(path);