The method 'basename' isn't defined for the type 'Path'. (Documentation)

1.8k Views Asked by At

This is the Error when u are uploading files to firestore firebase. So I sol this Error. Checkout the answer below in Answers section. Thanks

2

There are 2 best solutions below

1
On BEST ANSWER

Just add this Line in Imports import 'package:path/path.dart' as Path;

1
On

import 'package:path/path.dart' as Path; first import this file then add Path. just before baseman()