diff --git a/lib/src/utils/path_utils.dart b/lib/src/utils/path_utils.dart index 85fe77b..601c648 100644 --- a/lib/src/utils/path_utils.dart +++ b/lib/src/utils/path_utils.dart @@ -88,14 +88,12 @@ String getFileExtension({ } } -String getFileTypeFromMime({ - required String contentType, -}) { +String getFileTypeFromMime({required String contentType}) { return contentType.substring(contentType.lastIndexOf('/') + 1); } -String getBasenameWithoutExtension(String fileName) { - return path.basenameWithoutExtension(fileName); +String getBasenameWithoutExtension({required String filePath}) { + return path.basenameWithoutExtension(filePath); } Future _getDefaultIOSDir() async { diff --git a/test/src/utils/path_utils_test.dart b/test/src/utils/path_utils_test.dart index 1aa86cf..9964f0c 100644 --- a/test/src/utils/path_utils_test.dart +++ b/test/src/utils/path_utils_test.dart @@ -123,7 +123,9 @@ void main() { group('getBasenameWithoutExtension method', () { test('should return the basename without extension', () { - final basename = getBasenameWithoutExtension('file.pdf'); + final basename = getBasenameWithoutExtension( + filePath: '/hola/que/tal/file.pdf', + ); expect(basename, 'file'); });