-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#5653Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.d: examplesSample code and demosSample code and demosp: cameraThe camera pluginThe camera pluginp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem team
Description
Since flutter/packages#3513 is adding a new URI-typed factory method, the following packages needs to update it's deprecated examples:
- camera/camera
- camera/camera_android
- camera/camera_android_camerax
- camera/camera_avfoundation
- image_picker/image_picker
- image_picker/image_picker_android
- image_picker/image_picker_ios
The fix should be similar to this code
// deprecated
final VideoPlayerController vController = kIsWeb
? VideoPlayerController.network(videoFile!.path)
: VideoPlayerController.file(File(videoFile!.path));
// fixed
final VideoPlayerController vController = kIsWeb
? VideoPlayerController.networkUrl(Uri.parse(videoFile!.path))
: VideoPlayerController.file(File(videoFile!.path));Also, this update will fix the analyze's tests:
[31mThe following packages had errors:�[0m
[31m camera/camera�[0m
[31m camera_android�[0m
[31m camera_android_camerax�[0m
[31m camera_avfoundation�[0m
[31m image_picker/image_picker�[0m
[31m image_picker_android�[0m
[31m image_picker_ios�[0m
[31mSee above for full details.�[0m
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.d: examplesSample code and demosSample code and demosp: cameraThe camera pluginThe camera pluginp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem team