By running this command
flutter test test/widget_tests/rider/home/component/direction_search_fields_test.source.dart
I am trying to get this string path "test/widget_tests/rider/home/component/direction_search_fields_test.source.dart" from inside the file itself.
I tried
final dir = Platform.script.path;
But this gives me /project/path/main.dart