You can use the path package :
import 'dart:io';
import 'package:path/path.dart';
main() {
File file = new File("/dev/dart/work/hello/app.dart");
String filename = basename(file.path);
}
You can use the path package :
import 'dart:io';
import 'package:path/path.dart';
main() {
File file = new File("/dev/dart/work/hello/app.dart");
String filename = basename(file.path);
}