Skip to content

Commit

Permalink
Merge pull request #1261 from miguelpruivo/patch/fix-broken-links-in-…
Browse files Browse the repository at this point in the history
…readme-and-Uint8List-type-not-found

fix: replace broken GIFs in README by videos and add missing import statement
  • Loading branch information
miguelpruivo committed Apr 12, 2023
2 parents 7f00932 + cc3c176 commit f709753
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.2.9
#### General
Fixes the errors `Type 'Uint8List' not found` and `'Uint8List' isn't a type` ([#1260](https://github.com/miguelpruivo/flutter_file_picker/issues/1260)). Thank you @miguelslemos!

## 5.2.8

### Desktop (Windows)
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ For full usage details refer to the **[Wiki](https://github.com/miguelpruivo/flu

## Example App
#### Android
![DemoAndroid](https://github.com/miguelpruivo/flutter_file_picker/blob/bugfix/%231254-current-directory-changes-after-picking-files/example/screenshots/example_android.gif)
https://user-images.githubusercontent.com/9049899/231513581-12dbbaa1-5c5d-4c81-9e44-f7cd5207180b.mp4

#### iOS
![DemoMultiFilters](https://github.com/miguelpruivo/flutter_file_picker/blob/master/example/screenshots/example_ios.gif)
Expand All @@ -154,17 +154,15 @@ For full usage details refer to the **[Wiki](https://github.com/miguelpruivo/flu
![DemoMacOS](https://github.com/miguelpruivo/flutter_file_picker/blob/master/example/screenshots/example_macos.png)

#### Linux
![DemoLinux](https://github.com/miguelpruivo/flutter_file_picker/blob/bugfix/%231254-current-directory-changes-after-picking-files/example/screenshots/example_linux.gif)
https://user-images.githubusercontent.com/9049899/231513766-90a9cc75-b5c0-4816-ba15-4e3d3e2a6274.mp4


#### Windows
![DemoWindows](https://github.com/miguelpruivo/flutter_file_picker/blob/bugfix/%231254-current-directory-changes-after-picking-files/example/screenshots/example_windows.gif)
https://user-images.githubusercontent.com/9049899/231513826-958bd1d3-334b-4036-b126-3ff4ca716992.mp4

## Getting Started

For help getting started with Flutter, view our online
[documentation](https://flutter.io/).

For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code).



Binary file removed example/screenshots/example_android.gif
Binary file not shown.
Binary file removed example/screenshots/example_linux.gif
Binary file not shown.
Binary file removed example/screenshots/example_windows.gif
Binary file not shown.
2 changes: 2 additions & 0 deletions lib/src/platform_file.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'dart:async';
// ignore: unnecessary_import
import 'dart:typed_data';

import 'package:flutter/foundation.dart';

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A package that allows you to use a native file explorer to pick sin
homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker
repository: https://github.com/miguelpruivo/flutter_file_picker
issue_tracker: https://github.com/miguelpruivo/flutter_file_picker/issues
version: 5.2.8
version: 5.2.9

dependencies:
flutter:
Expand Down
39 changes: 39 additions & 0 deletions test/file_picker_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,44 @@ void main() {

expect(platformFiles.length, equals(filePaths.length));
});

test(
'should tranform a list of file paths containing a path into a list of PlatformFiles',
() async {
final filePaths = <String>['test'];

final platformFiles = await filePathsToPlatformFiles(
filePaths,
true,
false,
);

expect(platformFiles.length, equals(filePaths.length));
});

test(
'should transform a list of file paths containing a valid path into a list of PlatformFiles',
() async {
final filePaths = <String>['test/test_files/test.pdf'];

final platformFiles = await filePathsToPlatformFiles(
filePaths,
false,
true,
);

expect(platformFiles.length, equals(filePaths.length));
});
});

group('runExecutableWithArguments()', () {
test('should catch an exception when sending an empty filepath', () async {
final filepath = '';

expect(
() async => await isExecutableOnPath(filepath),
throwsA(isA<Exception>()),
);
});
});
}

0 comments on commit f709753

Please sign in to comment.