From 737b2034ff582a2aa9fdc8151f3e296117b5305a Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 11:48:15 +0100 Subject: [PATCH 01/18] Added stopRecordingVideo --- .../camera_platform_interface/CHANGELOG.md | 4 ++ .../lib/src/events/camera_event.dart | 45 +++++++++++++++++++ .../method_channel/method_channel_camera.dart | 28 ++++++++++++ .../platform_interface/camera_platform.dart | 15 ++++++- .../camera_platform_interface/pubspec.yaml | 4 +- 5 files changed, 93 insertions(+), 3 deletions(-) diff --git a/packages/camera/camera_platform_interface/CHANGELOG.md b/packages/camera/camera_platform_interface/CHANGELOG.md index d7442d4ac931..5bbc2c633ec7 100644 --- a/packages/camera/camera_platform_interface/CHANGELOG.md +++ b/packages/camera/camera_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.5.1 + +- Added VideoRecordedEvent to support ending a video recording in the native implementation. + ## 1.5.0 - Introduces interface methods for locking and unlocking the capture orientation. diff --git a/packages/camera/camera_platform_interface/lib/src/events/camera_event.dart b/packages/camera/camera_platform_interface/lib/src/events/camera_event.dart index d60a0a39f608..60f69bafa15f 100644 --- a/packages/camera/camera_platform_interface/lib/src/events/camera_event.dart +++ b/packages/camera/camera_platform_interface/lib/src/events/camera_event.dart @@ -235,3 +235,48 @@ class CameraErrorEvent extends CameraEvent { @override int get hashCode => super.hashCode ^ description.hashCode; } + +/// An event fired when a video has finished recording. +class VideoRecordedEvent extends CameraEvent { + /// XFile of the recorded video. + final XFile file; + /// Maximum duration of the recorded video. + final Duration maxVideoDuration; + + /// Build a VideoRecordedEvent triggered from the camera with the `cameraId`. + /// + /// The `file` represents the file of the video. + /// The `maxVideoDuration` shows if a maxVideoDuration shows if a maximum + /// video duration was set. + VideoRecordedEvent(int cameraId, this.file, this.maxVideoDuration) + : super(cameraId); + + /// Converts the supplied [Map] to an instance of the [VideoRecordedEvent] + /// class. + VideoRecordedEvent.fromJson(Map json) + : file = XFile(json['path']), + maxVideoDuration = json['maxVideoDuration'] != null + ? Duration(milliseconds: json['maxVideoDuration'] as int) + : null, + super(json['cameraId']); + + /// Converts the [VideoRecordedEvent] instance into a [Map] instance that can be + /// serialized to JSON. + Map toJson() => { + 'cameraId': cameraId, + 'path': file.path, + 'maxVideoDuration': maxVideoDuration?.inMilliseconds + }; + + @override + bool operator ==(Object other) => + identical(this, other) || + super == other && + other is VideoRecordedEvent && + runtimeType == other.runtimeType && + maxVideoDuration == other.maxVideoDuration; + + @override + int get hashCode => + super.hashCode ^ file.hashCode ^ maxVideoDuration.hashCode; +} diff --git a/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart b/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart index e6f658c45365..f6f5ccccbf3f 100644 --- a/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart +++ b/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart @@ -14,6 +14,7 @@ import 'package:cross_file/cross_file.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:meta/meta.dart'; +import 'package:pedantic/pedantic.dart'; import 'package:stream_transform/stream_transform.dart'; const MethodChannel _channel = MethodChannel('plugins.flutter.io/camera'); @@ -156,6 +157,11 @@ class MethodChannelCamera extends CameraPlatform { return _cameraEvents(cameraId).whereType(); } + @override + Stream onVideoRecordedEvent(int cameraId) { + return _cameraEvents(cameraId).whereType(); + } + @override Stream onDeviceOrientationChanged() { return deviceEventStreamController.stream @@ -216,6 +222,19 @@ class MethodChannelCamera extends CameraPlatform { return XFile(path); } + @override + Future stopRecordingVideo(int cameraId) async { + Completer completer = Completer(); + unawaited(onVideoRecordedEvent(cameraId) + .first + .then((event) => completer.complete(event.file))); + unawaited(_channel.invokeMethod( + 'stopVideoRecording', + {'cameraId': cameraId}, + )); + return completer.future; + } + @override Future pauseVideoRecording(int cameraId) => _channel.invokeMethod( 'pauseVideoRecording', @@ -433,6 +452,15 @@ class MethodChannelCamera extends CameraPlatform { cameraId, )); break; + case 'video_recorded': + cameraEventStreamController.add(VideoRecordedEvent( + cameraId, + XFile(call.arguments['path']), + call.arguments['maxVideoDuration'] != null + ? Duration(milliseconds: call.arguments['maxVideoDuration']) + : null, + )); + break; case 'error': cameraEventStreamController.add(CameraErrorEvent( cameraId, diff --git a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart index c1d6e09c3263..9da6b6bcec7f 100644 --- a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart +++ b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart @@ -87,6 +87,11 @@ abstract class CameraPlatform extends PlatformInterface { throw UnimplementedError('onCameraError() is not implemented.'); } + /// The camera finished recording a video + Stream onVideoRecordedEvent(int cameraId) { + throw UnimplementedError('onCameraTimeLimitReached() is not implemented.'); + } + /// The device orientation changed. /// /// Implementations for this: @@ -123,16 +128,24 @@ abstract class CameraPlatform extends PlatformInterface { /// The length of the recording can be limited by specifying the [maxVideoDuration]. /// By default no maximum duration is specified, /// meaning the recording will continue until manually stopped. - /// The video is returned as a [XFile] after calling [stopVideoRecording]. + /// The video is returned in a [VideoRecordedEvent] in the [onVideoRecordedEvent] stream. Future startVideoRecording(int cameraId, {Duration maxVideoDuration}) { throw UnimplementedError('startVideoRecording() is not implemented.'); } /// Stops the video recording and returns the file where it was saved. + /// Function is deprecated and is replaced by [stopRecordingVideo]. + /// This function will be removed in 2.0.0 + @deprecated Future stopVideoRecording(int cameraId) { throw UnimplementedError('stopVideoRecording() is not implemented.'); } + /// Stops the video recording and returns the file where it was saved. + Future stopRecordingVideo(int cameraId) { + throw UnimplementedError('stopVideoRecording() is not implemented.'); + } + /// Pause video recording. Future pauseVideoRecording(int cameraId) { throw UnimplementedError('pauseVideoRecording() is not implemented.'); diff --git a/packages/camera/camera_platform_interface/pubspec.yaml b/packages/camera/camera_platform_interface/pubspec.yaml index 2a8d7ce9abe1..bd192898bed4 100644 --- a/packages/camera/camera_platform_interface/pubspec.yaml +++ b/packages/camera/camera_platform_interface/pubspec.yaml @@ -3,7 +3,7 @@ description: A common platform interface for the camera plugin. homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera_platform_interface # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 1.5.0 +version: 1.5.1 dependencies: flutter: @@ -12,13 +12,13 @@ dependencies: plugin_platform_interface: ^1.0.1 cross_file: ^0.1.0 stream_transform: ^1.2.0 + pedantic: ^1.8.0 dev_dependencies: flutter_test: sdk: flutter async: ^2.4.2 mockito: ^4.1.1 - pedantic: ^1.8.0 environment: sdk: ">=2.7.0 <3.0.0" From 23e5ded9504f4604dc8eddf0df739c1a9508b462 Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 12:17:02 +0100 Subject: [PATCH 02/18] Removed deprecation and made stopRecordingVideo return void --- .../lib/src/method_channel/method_channel_camera.dart | 11 +++-------- .../lib/src/platform_interface/camera_platform.dart | 9 +++------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart b/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart index f6f5ccccbf3f..d5b0605b2ee5 100644 --- a/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart +++ b/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart @@ -223,16 +223,11 @@ class MethodChannelCamera extends CameraPlatform { } @override - Future stopRecordingVideo(int cameraId) async { - Completer completer = Completer(); - unawaited(onVideoRecordedEvent(cameraId) - .first - .then((event) => completer.complete(event.file))); - unawaited(_channel.invokeMethod( + Future stopRecordingVideo(int cameraId) async { + await _channel.invokeMethod( 'stopVideoRecording', {'cameraId': cameraId}, - )); - return completer.future; + ); } @override diff --git a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart index 9da6b6bcec7f..fa9c56dee344 100644 --- a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart +++ b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart @@ -134,16 +134,13 @@ abstract class CameraPlatform extends PlatformInterface { } /// Stops the video recording and returns the file where it was saved. - /// Function is deprecated and is replaced by [stopRecordingVideo]. - /// This function will be removed in 2.0.0 - @deprecated Future stopVideoRecording(int cameraId) { throw UnimplementedError('stopVideoRecording() is not implemented.'); } - /// Stops the video recording and returns the file where it was saved. - Future stopRecordingVideo(int cameraId) { - throw UnimplementedError('stopVideoRecording() is not implemented.'); + /// Stops the video recording. The file will be returned in [onVideoRecordedEvent]. + Future stopRecordingVideo(int cameraId) { + throw UnimplementedError('stopRecordingVideo() is not implemented.'); } /// Pause video recording. From bd9a2313c4028b3c50234cfcca7d302db4a19dc2 Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 12:17:18 +0100 Subject: [PATCH 03/18] Removed unused import --- .../lib/src/method_channel/method_channel_camera.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart b/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart index d5b0605b2ee5..02aa1ebdf403 100644 --- a/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart +++ b/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart @@ -14,7 +14,6 @@ import 'package:cross_file/cross_file.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:meta/meta.dart'; -import 'package:pedantic/pedantic.dart'; import 'package:stream_transform/stream_transform.dart'; const MethodChannel _channel = MethodChannel('plugins.flutter.io/camera'); From e60de19e628e9f49e2aa5518774ae8cc68f40e8d Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 12:19:37 +0100 Subject: [PATCH 04/18] Revert pubspec change --- packages/camera/camera_platform_interface/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/camera/camera_platform_interface/pubspec.yaml b/packages/camera/camera_platform_interface/pubspec.yaml index bd192898bed4..8584d9c03213 100644 --- a/packages/camera/camera_platform_interface/pubspec.yaml +++ b/packages/camera/camera_platform_interface/pubspec.yaml @@ -12,13 +12,13 @@ dependencies: plugin_platform_interface: ^1.0.1 cross_file: ^0.1.0 stream_transform: ^1.2.0 - pedantic: ^1.8.0 dev_dependencies: flutter_test: sdk: flutter async: ^2.4.2 mockito: ^4.1.1 + pedantic: ^1.8.0 environment: sdk: ">=2.7.0 <3.0.0" From 98da8e307af99d8cfa60c51ea1858bb53c8f83e0 Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 13:02:52 +0100 Subject: [PATCH 05/18] Updated documentation --- .../lib/src/platform_interface/camera_platform.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart index fa9c56dee344..726b8f2ab6e6 100644 --- a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart +++ b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart @@ -128,7 +128,8 @@ abstract class CameraPlatform extends PlatformInterface { /// The length of the recording can be limited by specifying the [maxVideoDuration]. /// By default no maximum duration is specified, /// meaning the recording will continue until manually stopped. - /// The video is returned in a [VideoRecordedEvent] in the [onVideoRecordedEvent] stream. + /// With [maxVideoDuration] set the video is returned in a [VideoRecordedEvent] + /// in the [onVideoRecordedEvent] stream. Future startVideoRecording(int cameraId, {Duration maxVideoDuration}) { throw UnimplementedError('startVideoRecording() is not implemented.'); } From 19c4f327b208af23e83b4997aa0ed21dd04a387d Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 13:11:30 +0100 Subject: [PATCH 06/18] removed stopRecordingVideo --- .../lib/src/method_channel/method_channel_camera.dart | 8 -------- .../lib/src/platform_interface/camera_platform.dart | 5 ----- 2 files changed, 13 deletions(-) diff --git a/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart b/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart index 02aa1ebdf403..36a2c92645f2 100644 --- a/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart +++ b/packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart @@ -221,14 +221,6 @@ class MethodChannelCamera extends CameraPlatform { return XFile(path); } - @override - Future stopRecordingVideo(int cameraId) async { - await _channel.invokeMethod( - 'stopVideoRecording', - {'cameraId': cameraId}, - ); - } - @override Future pauseVideoRecording(int cameraId) => _channel.invokeMethod( 'pauseVideoRecording', diff --git a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart index 726b8f2ab6e6..5b145662cf0f 100644 --- a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart +++ b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart @@ -139,11 +139,6 @@ abstract class CameraPlatform extends PlatformInterface { throw UnimplementedError('stopVideoRecording() is not implemented.'); } - /// Stops the video recording. The file will be returned in [onVideoRecordedEvent]. - Future stopRecordingVideo(int cameraId) { - throw UnimplementedError('stopRecordingVideo() is not implemented.'); - } - /// Pause video recording. Future pauseVideoRecording(int cameraId) { throw UnimplementedError('pauseVideoRecording() is not implemented.'); From f97a436041b667ad78434b0711a546b87626f5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl?= <32639467+danielroek@users.noreply.github.com> Date: Fri, 5 Feb 2021 14:01:49 +0100 Subject: [PATCH 07/18] Update packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart Co-authored-by: Maurits van Beusekom --- .../lib/src/platform_interface/camera_platform.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart index 5b145662cf0f..b607ba0a11d7 100644 --- a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart +++ b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart @@ -128,8 +128,8 @@ abstract class CameraPlatform extends PlatformInterface { /// The length of the recording can be limited by specifying the [maxVideoDuration]. /// By default no maximum duration is specified, /// meaning the recording will continue until manually stopped. - /// With [maxVideoDuration] set the video is returned in a [VideoRecordedEvent] - /// in the [onVideoRecordedEvent] stream. + /// With [maxVideoDuration] set the video is returned as a [VideoRecordedEvent] + /// through the [onVideoRecordedEvent] stream when the set duration is reached. Future startVideoRecording(int cameraId, {Duration maxVideoDuration}) { throw UnimplementedError('startVideoRecording() is not implemented.'); } From 9f8a17c701f150f72dec5f9e46dcf14b3d46ee15 Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 14:05:47 +0100 Subject: [PATCH 08/18] fixed formatting --- .../camera/camera/coverage/html/amber.png | Bin 0 -> 141 bytes .../camera/camera/coverage/html/emerald.png | Bin 0 -> 141 bytes packages/camera/camera/coverage/html/gcov.css | 519 ++++++++++++++++ .../camera/camera/coverage/html/glass.png | Bin 0 -> 167 bytes .../camera/coverage/html/index-sort-f.html | 103 ++++ .../camera/coverage/html/index-sort-l.html | 103 ++++ .../camera/camera/coverage/html/index.html | 103 ++++ packages/camera/camera/coverage/html/ruby.png | Bin 0 -> 141 bytes packages/camera/camera/coverage/html/snow.png | Bin 0 -> 141 bytes .../camera_controller.dart.func-sort-c.html | 72 +++ .../html/src/camera_controller.dart.func.html | 72 +++ .../html/src/camera_controller.dart.gcov.html | 571 ++++++++++++++++++ .../src/camera_image.dart.func-sort-c.html | 72 +++ .../html/src/camera_image.dart.func.html | 72 +++ .../html/src/camera_image.dart.gcov.html | 235 +++++++ .../src/camera_preview.dart.func-sort-c.html | 72 +++ .../html/src/camera_preview.dart.func.html | 72 +++ .../html/src/camera_preview.dart.gcov.html | 99 +++ .../coverage/html/src/index-sort-f.html | 113 ++++ .../coverage/html/src/index-sort-l.html | 113 ++++ .../camera/coverage/html/src/index.html | 113 ++++ .../camera/camera/coverage/html/updown.png | Bin 0 -> 117 bytes .../image_format_utils.dart.func-sort-c.html | 72 +++ .../utils/image_format_utils.dart.func.html | 72 +++ .../utils/image_format_utils.dart.gcov.html | 110 ++++ .../coverage/html/utils/index-sort-f.html | 93 +++ .../coverage/html/utils/index-sort-l.html | 93 +++ .../camera/coverage/html/utils/index.html | 93 +++ packages/camera/camera/coverage/lcov.info | 202 +++++++ .../coverage/html/amber.png | Bin 0 -> 141 bytes .../coverage/html/emerald.png | Bin 0 -> 141 bytes .../events/camera_event.dart.func-sort-c.html | 72 +++ .../html/events/camera_event.dart.func.html | 72 +++ .../html/events/camera_event.dart.gcov.html | 274 +++++++++ .../coverage/html/events/index-sort-f.html | 93 +++ .../coverage/html/events/index-sort-l.html | 93 +++ .../coverage/html/events/index.html | 93 +++ .../coverage/html/gcov.css | 519 ++++++++++++++++ .../coverage/html/glass.png | Bin 0 -> 167 bytes .../coverage/html/index-sort-f.html | 133 ++++ .../coverage/html/index-sort-l.html | 133 ++++ .../coverage/html/index.html | 133 ++++ .../html/method_channel/index-sort-f.html | 93 +++ .../html/method_channel/index-sort-l.html | 93 +++ .../coverage/html/method_channel/index.html | 93 +++ ...ethod_channel_camera.dart.func-sort-c.html | 72 +++ .../method_channel_camera.dart.func.html | 72 +++ .../method_channel_camera.dart.gcov.html | 370 ++++++++++++ .../camera_platform.dart.func-sort-c.html | 72 +++ .../camera_platform.dart.func.html | 72 +++ .../camera_platform.dart.gcov.html | 225 +++++++ .../html/platform_interface/index-sort-f.html | 93 +++ .../html/platform_interface/index-sort-l.html | 93 +++ .../html/platform_interface/index.html | 93 +++ .../coverage/html/ruby.png | Bin 0 -> 141 bytes .../coverage/html/snow.png | Bin 0 -> 141 bytes .../camera_description.dart.func-sort-c.html | 72 +++ .../types/camera_description.dart.func.html | 72 +++ .../types/camera_description.dart.gcov.html | 128 ++++ .../camera_exception.dart.func-sort-c.html | 72 +++ .../types/camera_exception.dart.func.html | 72 +++ .../types/camera_exception.dart.gcov.html | 96 +++ .../types/flash_mode.dart.func-sort-c.html | 72 +++ .../html/types/flash_mode.dart.func.html | 72 +++ .../html/types/flash_mode.dart.gcov.html | 94 +++ .../image_format_group.dart.func-sort-c.html | 72 +++ .../types/image_format_group.dart.func.html | 72 +++ .../types/image_format_group.dart.gcov.html | 126 ++++ .../coverage/html/types/index-sort-f.html | 133 ++++ .../coverage/html/types/index-sort-l.html | 133 ++++ .../coverage/html/types/index.html | 133 ++++ .../resolution_preset.dart.func-sort-c.html | 72 +++ .../types/resolution_preset.dart.func.html | 72 +++ .../types/resolution_preset.dart.gcov.html | 102 ++++ .../coverage/html/updown.png | Bin 0 -> 117 bytes .../coverage/html/utils/index-sort-f.html | 93 +++ .../coverage/html/utils/index-sort-l.html | 93 +++ .../coverage/html/utils/index.html | 93 +++ .../html/utils/utils.dart.func-sort-c.html | 72 +++ .../coverage/html/utils/utils.dart.func.html | 72 +++ .../coverage/html/utils/utils.dart.gcov.html | 90 +++ .../coverage/lcov.info | 305 ++++++++++ .../lib/src/events/camera_event.dart | 17 +- 83 files changed, 8787 insertions(+), 8 deletions(-) create mode 100644 packages/camera/camera/coverage/html/amber.png create mode 100644 packages/camera/camera/coverage/html/emerald.png create mode 100644 packages/camera/camera/coverage/html/gcov.css create mode 100644 packages/camera/camera/coverage/html/glass.png create mode 100644 packages/camera/camera/coverage/html/index-sort-f.html create mode 100644 packages/camera/camera/coverage/html/index-sort-l.html create mode 100644 packages/camera/camera/coverage/html/index.html create mode 100644 packages/camera/camera/coverage/html/ruby.png create mode 100644 packages/camera/camera/coverage/html/snow.png create mode 100644 packages/camera/camera/coverage/html/src/camera_controller.dart.func-sort-c.html create mode 100644 packages/camera/camera/coverage/html/src/camera_controller.dart.func.html create mode 100644 packages/camera/camera/coverage/html/src/camera_controller.dart.gcov.html create mode 100644 packages/camera/camera/coverage/html/src/camera_image.dart.func-sort-c.html create mode 100644 packages/camera/camera/coverage/html/src/camera_image.dart.func.html create mode 100644 packages/camera/camera/coverage/html/src/camera_image.dart.gcov.html create mode 100644 packages/camera/camera/coverage/html/src/camera_preview.dart.func-sort-c.html create mode 100644 packages/camera/camera/coverage/html/src/camera_preview.dart.func.html create mode 100644 packages/camera/camera/coverage/html/src/camera_preview.dart.gcov.html create mode 100644 packages/camera/camera/coverage/html/src/index-sort-f.html create mode 100644 packages/camera/camera/coverage/html/src/index-sort-l.html create mode 100644 packages/camera/camera/coverage/html/src/index.html create mode 100644 packages/camera/camera/coverage/html/updown.png create mode 100644 packages/camera/camera/coverage/html/utils/image_format_utils.dart.func-sort-c.html create mode 100644 packages/camera/camera/coverage/html/utils/image_format_utils.dart.func.html create mode 100644 packages/camera/camera/coverage/html/utils/image_format_utils.dart.gcov.html create mode 100644 packages/camera/camera/coverage/html/utils/index-sort-f.html create mode 100644 packages/camera/camera/coverage/html/utils/index-sort-l.html create mode 100644 packages/camera/camera/coverage/html/utils/index.html create mode 100644 packages/camera/camera/coverage/lcov.info create mode 100644 packages/camera/camera_platform_interface/coverage/html/amber.png create mode 100644 packages/camera/camera_platform_interface/coverage/html/emerald.png create mode 100644 packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/events/index-sort-f.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/events/index-sort-l.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/events/index.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/gcov.css create mode 100644 packages/camera/camera_platform_interface/coverage/html/glass.png create mode 100644 packages/camera/camera_platform_interface/coverage/html/index-sort-f.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/index-sort-l.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/index.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-f.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-l.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/index.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-f.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-l.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/index.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/ruby.png create mode 100644 packages/camera/camera_platform_interface/coverage/html/snow.png create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/index-sort-f.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/index-sort-l.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/index.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/updown.png create mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/index-sort-f.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/index-sort-l.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/index.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func-sort-c.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func.html create mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.gcov.html create mode 100644 packages/camera/camera_platform_interface/coverage/lcov.info diff --git a/packages/camera/camera/coverage/html/amber.png b/packages/camera/camera/coverage/html/amber.png new file mode 100644 index 0000000000000000000000000000000000000000..2cab170d8359081983a4e343848dfe06bc490f12 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^G2tW}LqE04T&+ z;1OBOz`!j8!i<;h*8KqrvZOouIx;Y9?C1WI$O`1M1^9%x{(levWG?NMQuI!iC1^Jb!lvI6;R0X`wF(yt=9xVZRt1vCRixIA4P dLn>}1Cji+@42)0J?}79&c)I$ztaD0e0sy@GAL0N2 literal 0 HcmV?d00001 diff --git a/packages/camera/camera/coverage/html/gcov.css b/packages/camera/camera/coverage/html/gcov.css new file mode 100644 index 000000000000..bfd0a83e10b5 --- /dev/null +++ b/packages/camera/camera/coverage/html/gcov.css @@ -0,0 +1,519 @@ +/* All views: initial background and text color */ +body +{ + color: #000000; + background-color: #FFFFFF; +} + +/* All views: standard link format*/ +a:link +{ + color: #284FA8; + text-decoration: underline; +} + +/* All views: standard link - visited format */ +a:visited +{ + color: #00CB40; + text-decoration: underline; +} + +/* All views: standard link - activated format */ +a:active +{ + color: #FF0040; + text-decoration: underline; +} + +/* All views: main title format */ +td.title +{ + text-align: center; + padding-bottom: 10px; + font-family: sans-serif; + font-size: 20pt; + font-style: italic; + font-weight: bold; +} + +/* All views: header item format */ +td.headerItem +{ + text-align: right; + padding-right: 6px; + font-family: sans-serif; + font-weight: bold; + vertical-align: top; + white-space: nowrap; +} + +/* All views: header item value format */ +td.headerValue +{ + text-align: left; + color: #284FA8; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; +} + +/* All views: header item coverage table heading */ +td.headerCovTableHead +{ + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + font-size: 80%; + white-space: nowrap; +} + +/* All views: header item coverage table entry */ +td.headerCovTableEntry +{ + text-align: right; + color: #284FA8; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #DAE7FE; +} + +/* All views: header item coverage table entry for high coverage rate */ +td.headerCovTableEntryHi +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #A7FC9D; +} + +/* All views: header item coverage table entry for medium coverage rate */ +td.headerCovTableEntryMed +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #FFEA20; +} + +/* All views: header item coverage table entry for ow coverage rate */ +td.headerCovTableEntryLo +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #FF0000; +} + +/* All views: header legend value for legend entry */ +td.headerValueLeg +{ + text-align: left; + color: #000000; + font-family: sans-serif; + font-size: 80%; + white-space: nowrap; + padding-top: 4px; +} + +/* All views: color of horizontal ruler */ +td.ruler +{ + background-color: #6688D4; +} + +/* All views: version string format */ +td.versionInfo +{ + text-align: center; + padding-top: 2px; + font-family: sans-serif; + font-style: italic; +} + +/* Directory view/File view (all)/Test case descriptions: + table headline format */ +td.tableHead +{ + text-align: center; + color: #FFFFFF; + background-color: #6688D4; + font-family: sans-serif; + font-size: 120%; + font-weight: bold; + white-space: nowrap; + padding-left: 4px; + padding-right: 4px; +} + +span.tableHeadSort +{ + padding-right: 4px; +} + +/* Directory view/File view (all): filename entry format */ +td.coverFile +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284FA8; + background-color: #DAE7FE; + font-family: monospace; +} + +/* Directory view/File view (all): bar-graph entry format*/ +td.coverBar +{ + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; +} + +/* Directory view/File view (all): bar-graph outline color */ +td.coverBarOutline +{ + background-color: #000000; +} + +/* Directory view/File view (all): percentage entry for files with + high coverage rate */ +td.coverPerHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #A7FC9D; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + high coverage rate */ +td.coverNumHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #A7FC9D; + white-space: nowrap; + font-family: sans-serif; +} + +/* Directory view/File view (all): percentage entry for files with + medium coverage rate */ +td.coverPerMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FFEA20; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + medium coverage rate */ +td.coverNumMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FFEA20; + white-space: nowrap; + font-family: sans-serif; +} + +/* Directory view/File view (all): percentage entry for files with + low coverage rate */ +td.coverPerLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + low coverage rate */ +td.coverNumLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + white-space: nowrap; + font-family: sans-serif; +} + +/* File view (all): "show/hide details" link format */ +a.detail:link +{ + color: #B8D0FF; + font-size:80%; +} + +/* File view (all): "show/hide details" link - visited format */ +a.detail:visited +{ + color: #B8D0FF; + font-size:80%; +} + +/* File view (all): "show/hide details" link - activated format */ +a.detail:active +{ + color: #FFFFFF; + font-size:80%; +} + +/* File view (detail): test name entry */ +td.testName +{ + text-align: right; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* File view (detail): test percentage entry */ +td.testPer +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* File view (detail): test lines count entry */ +td.testNum +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* Test case descriptions: test name format*/ +dt +{ + font-family: sans-serif; + font-weight: bold; +} + +/* Test case descriptions: description table body */ +td.testDescription +{ + padding-top: 10px; + padding-left: 30px; + padding-bottom: 10px; + padding-right: 30px; + background-color: #DAE7FE; +} + +/* Source code view: function entry */ +td.coverFn +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284FA8; + background-color: #DAE7FE; + font-family: monospace; +} + +/* Source code view: function entry zero count*/ +td.coverFnLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + font-weight: bold; + font-family: sans-serif; +} + +/* Source code view: function entry nonzero count*/ +td.coverFnHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-weight: bold; + font-family: sans-serif; +} + +/* Source code view: source code format */ +pre.source +{ + font-family: monospace; + white-space: pre; + margin-top: 2px; +} + +/* Source code view: line number format */ +span.lineNum +{ + background-color: #EFE383; +} + +/* Source code view: format for lines which were executed */ +td.lineCov, +span.lineCov +{ + background-color: #CAD7FE; +} + +/* Source code view: format for Cov legend */ +span.coverLegendCov +{ + padding-left: 10px; + padding-right: 10px; + padding-bottom: 2px; + background-color: #CAD7FE; +} + +/* Source code view: format for lines which were not executed */ +td.lineNoCov, +span.lineNoCov +{ + background-color: #FF6230; +} + +/* Source code view: format for NoCov legend */ +span.coverLegendNoCov +{ + padding-left: 10px; + padding-right: 10px; + padding-bottom: 2px; + background-color: #FF6230; +} + +/* Source code view (function table): standard link - visited format */ +td.lineNoCov > a:visited, +td.lineCov > a:visited +{ + color: black; + text-decoration: underline; +} + +/* Source code view: format for lines which were executed only in a + previous version */ +span.lineDiffCov +{ + background-color: #B5F7AF; +} + +/* Source code view: format for branches which were executed + * and taken */ +span.branchCov +{ + background-color: #CAD7FE; +} + +/* Source code view: format for branches which were executed + * but not taken */ +span.branchNoCov +{ + background-color: #FF6230; +} + +/* Source code view: format for branches which were not executed */ +span.branchNoExec +{ + background-color: #FF6230; +} + +/* Source code view: format for the source code heading line */ +pre.sourceHeading +{ + white-space: pre; + font-family: monospace; + font-weight: bold; + margin: 0px; +} + +/* All views: header legend value for low rate */ +td.headerValueLegL +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 4px; + padding-right: 2px; + background-color: #FF0000; + font-size: 80%; +} + +/* All views: header legend value for med rate */ +td.headerValueLegM +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 2px; + padding-right: 2px; + background-color: #FFEA20; + font-size: 80%; +} + +/* All views: header legend value for hi rate */ +td.headerValueLegH +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 2px; + padding-right: 4px; + background-color: #A7FC9D; + font-size: 80%; +} + +/* All views except source code view: legend format for low coverage */ +span.coverLegendCovLo +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #FF0000; +} + +/* All views except source code view: legend format for med coverage */ +span.coverLegendCovMed +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #FFEA20; +} + +/* All views except source code view: legend format for hi coverage */ +span.coverLegendCovHi +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #A7FC9D; +} diff --git a/packages/camera/camera/coverage/html/glass.png b/packages/camera/camera/coverage/html/glass.png new file mode 100644 index 0000000000000000000000000000000000000000..e1abc00680a3093c49fdb775ae6bdb6764c95af2 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)gaEa{HEjtmSN`?>!lvI6;R0X`wF z|Ns97GD8ntt^-nxB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gf+eGhVt|_XjA* zUgGKN%6^Gmn4d%Ph(nkFP>9RZ#WAE}PI3Z}&BVayv3^M*kj3EX>gTe~DWM4f=_Dpv literal 0 HcmV?d00001 diff --git a/packages/camera/camera/coverage/html/index-sort-f.html b/packages/camera/camera/coverage/html/index-sort-f.html new file mode 100644 index 000000000000..6bc890af8a2e --- /dev/null +++ b/packages/camera/camera/coverage/html/index-sort-f.html @@ -0,0 +1,103 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12818668.8 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils +
63.6%63.6%
+
63.6 %7 / 11-0 / 0
src +
69.1%69.1%
+
69.1 %121 / 175-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/index-sort-l.html b/packages/camera/camera/coverage/html/index-sort-l.html new file mode 100644 index 000000000000..c2f7c1b5a962 --- /dev/null +++ b/packages/camera/camera/coverage/html/index-sort-l.html @@ -0,0 +1,103 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12818668.8 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils +
63.6%63.6%
+
63.6 %7 / 11-0 / 0
src +
69.1%69.1%
+
69.1 %121 / 175-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/index.html b/packages/camera/camera/coverage/html/index.html new file mode 100644 index 000000000000..b011287a6d85 --- /dev/null +++ b/packages/camera/camera/coverage/html/index.html @@ -0,0 +1,103 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12818668.8 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
src +
69.1%69.1%
+
69.1 %121 / 175-0 / 0
utils +
63.6%63.6%
+
63.6 %7 / 11-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/ruby.png b/packages/camera/camera/coverage/html/ruby.png new file mode 100644 index 0000000000000000000000000000000000000000..991b6d4ec9e78be165e3ef757eed1aada287364d GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^FceV#7`HfI^%F z9+AZi4BSE>%y{W;-5;PJOS+@4BLl<6e(pbstUx|nfKQ0)e^Y%R^MdiLxj>4`)5S5Q b;#P73kj=!v_*DHKNFRfztDnm{r-UW|iOwIS literal 0 HcmV?d00001 diff --git a/packages/camera/camera/coverage/html/snow.png b/packages/camera/camera/coverage/html/snow.png new file mode 100644 index 0000000000000000000000000000000000000000..2cdae107fceec6e7f02ac7acb4a34a82a540caa5 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^MM!lvI6;R0X`wF|Ns97GD8ntt^-nBo-U3d c6}OTTfNUlP#;5A{K>8RwUHx3vIVCg!071?oo&W#< literal 0 HcmV?d00001 diff --git a/packages/camera/camera/coverage/html/src/camera_controller.dart.func-sort-c.html b/packages/camera/camera/coverage/html/src/camera_controller.dart.func-sort-c.html new file mode 100644 index 000000000000..29c417f5bdd7 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_controller.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - src/camera_controller.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_controller.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:9714566.9 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/camera_controller.dart.func.html b/packages/camera/camera/coverage/html/src/camera_controller.dart.func.html new file mode 100644 index 000000000000..e90f8f2ac308 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_controller.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - src/camera_controller.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_controller.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:9714566.9 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/camera_controller.dart.gcov.html b/packages/camera/camera/coverage/html/src/camera_controller.dart.gcov.html new file mode 100644 index 000000000000..2f6e2c4fe94c --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_controller.dart.gcov.html @@ -0,0 +1,571 @@ + + + + + + + LCOV - lcov.info - src/camera_controller.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_controller.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:9714566.9 %
Date:2020-12-22 12:19:05Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : import 'dart:async';
+       6             : 
+       7             : import 'package:camera/camera.dart';
+       8             : import 'package:camera_platform_interface/camera_platform_interface.dart';
+       9             : import 'package:flutter/foundation.dart';
+      10             : import 'package:flutter/material.dart';
+      11             : import 'package:flutter/services.dart';
+      12             : 
+      13             : import '../utils/image_format_utils.dart';
+      14             : 
+      15           2 : final MethodChannel _channel = const MethodChannel('plugins.flutter.io/camera');
+      16             : 
+      17             : /// Signature for a callback receiving the a camera image.
+      18             : ///
+      19             : /// This is used by [CameraController.startImageStream].
+      20             : // ignore: inference_failure_on_function_return_type
+      21             : typedef onLatestImageAvailable = Function(CameraImage image);
+      22             : 
+      23             : /// Completes with a list of available cameras.
+      24             : ///
+      25             : /// May throw a [CameraException].
+      26           1 : Future<List<CameraDescription>> availableCameras() async {
+      27           2 :   return CameraPlatform.instance.availableCameras();
+      28             : }
+      29             : 
+      30             : /// The state of a [CameraController].
+      31             : class CameraValue {
+      32             :   /// Creates a new camera controller state.
+      33           3 :   const CameraValue({
+      34             :     this.isInitialized,
+      35             :     this.errorDescription,
+      36             :     this.previewSize,
+      37             :     this.isRecordingVideo,
+      38             :     this.isTakingPicture,
+      39             :     this.isStreamingImages,
+      40             :     bool isRecordingPaused,
+      41             :   }) : _isRecordingPaused = isRecordingPaused;
+      42             : 
+      43             :   /// Creates a new camera controller state for an uninitialized controller.
+      44           0 :   const CameraValue.uninitialized()
+      45           0 :       : this(
+      46             :           isInitialized: false,
+      47             :           isRecordingVideo: false,
+      48             :           isTakingPicture: false,
+      49             :           isStreamingImages: false,
+      50             :           isRecordingPaused: false,
+      51             :         );
+      52             : 
+      53             :   /// True after [CameraController.initialize] has completed successfully.
+      54             :   final bool isInitialized;
+      55             : 
+      56             :   /// True when a picture capture request has been sent but as not yet returned.
+      57             :   final bool isTakingPicture;
+      58             : 
+      59             :   /// True when the camera is recording (not the same as previewing).
+      60             :   final bool isRecordingVideo;
+      61             : 
+      62             :   /// True when images from the camera are being streamed.
+      63             :   final bool isStreamingImages;
+      64             : 
+      65             :   final bool _isRecordingPaused;
+      66             : 
+      67             :   /// True when camera [isRecordingVideo] and recording is paused.
+      68           2 :   bool get isRecordingPaused => isRecordingVideo && _isRecordingPaused;
+      69             : 
+      70             :   /// Description of an error state.
+      71             :   ///
+      72             :   /// This is null while the controller is not in an error state.
+      73             :   /// When [hasError] is true this contains the error description.
+      74             :   final String errorDescription;
+      75             : 
+      76             :   /// The size of the preview in pixels.
+      77             :   ///
+      78             :   /// Is `null` until  [isInitialized] is `true`.
+      79             :   final Size previewSize;
+      80             : 
+      81             :   /// Convenience getter for `previewSize.height / previewSize.width`.
+      82             :   ///
+      83             :   /// Can only be called when [initialize] is done.
+      84          12 :   double get aspectRatio => previewSize.height / previewSize.width;
+      85             : 
+      86             :   /// Whether the controller is in an error state.
+      87             :   ///
+      88             :   /// When true [errorDescription] describes the error.
+      89           2 :   bool get hasError => errorDescription != null;
+      90             : 
+      91             :   /// Creates a modified copy of the object.
+      92             :   ///
+      93             :   /// Explicitly specified fields get the specified value, all other fields get
+      94             :   /// the same value of the current object.
+      95           3 :   CameraValue copyWith({
+      96             :     bool isInitialized,
+      97             :     bool isRecordingVideo,
+      98             :     bool isTakingPicture,
+      99             :     bool isStreamingImages,
+     100             :     String errorDescription,
+     101             :     Size previewSize,
+     102             :     bool isRecordingPaused,
+     103             :   }) {
+     104           3 :     return CameraValue(
+     105           3 :       isInitialized: isInitialized ?? this.isInitialized,
+     106             :       errorDescription: errorDescription,
+     107           3 :       previewSize: previewSize ?? this.previewSize,
+     108           3 :       isRecordingVideo: isRecordingVideo ?? this.isRecordingVideo,
+     109           3 :       isTakingPicture: isTakingPicture ?? this.isTakingPicture,
+     110           3 :       isStreamingImages: isStreamingImages ?? this.isStreamingImages,
+     111           3 :       isRecordingPaused: isRecordingPaused ?? _isRecordingPaused,
+     112             :     );
+     113             :   }
+     114             : 
+     115           1 :   @override
+     116             :   String toString() {
+     117           2 :     return '$runtimeType('
+     118           1 :         'isRecordingVideo: $isRecordingVideo, '
+     119           1 :         'isInitialized: $isInitialized, '
+     120           1 :         'errorDescription: $errorDescription, '
+     121           1 :         'previewSize: $previewSize, '
+     122           1 :         'isStreamingImages: $isStreamingImages)';
+     123             :   }
+     124             : }
+     125             : 
+     126             : /// Controls a device camera.
+     127             : ///
+     128             : /// Use [availableCameras] to get a list of available cameras.
+     129             : ///
+     130             : /// Before using a [CameraController] a call to [initialize] must complete.
+     131             : ///
+     132             : /// To show the camera preview on the screen use a [CameraPreview] widget.
+     133             : class CameraController extends ValueNotifier<CameraValue> {
+     134             :   /// Creates a new camera controller in an uninitialized state.
+     135           2 :   CameraController(
+     136             :     this.description,
+     137             :     this.resolutionPreset, {
+     138             :     this.enableAudio = true,
+     139             :     this.imageFormatGroup,
+     140           2 :   }) : super(const CameraValue.uninitialized());
+     141             : 
+     142             :   /// The properties of the camera device controlled by this controller.
+     143             :   final CameraDescription description;
+     144             : 
+     145             :   /// The resolution this controller is targeting.
+     146             :   ///
+     147             :   /// This resolution preset is not guaranteed to be available on the device,
+     148             :   /// if unavailable a lower resolution will be used.
+     149             :   ///
+     150             :   /// See also: [ResolutionPreset].
+     151             :   final ResolutionPreset resolutionPreset;
+     152             : 
+     153             :   /// Whether to include audio when recording a video.
+     154             :   final bool enableAudio;
+     155             : 
+     156             :   /// The [ImageFormatGroup] describes the output of the raw image format.
+     157             :   ///
+     158             :   /// When null the imageFormat will fallback to the platforms default
+     159             :   final ImageFormatGroup imageFormatGroup;
+     160             : 
+     161             :   int _cameraId;
+     162             :   bool _isDisposed = false;
+     163             :   StreamSubscription<dynamic> _imageStreamSubscription;
+     164             :   FutureOr<bool> _initCalled;
+     165             : 
+     166             :   /// Checks whether [CameraController.dispose] has completed successfully.
+     167             :   ///
+     168             :   /// This is a no-op when asserts are disabled.
+     169           1 :   void debugCheckIsDisposed() {
+     170           1 :     assert(_isDisposed);
+     171             :   }
+     172             : 
+     173             :   /// The camera identifier with which the controller is associated.
+     174           0 :   int get cameraId => _cameraId;
+     175             : 
+     176             :   /// Initializes the camera on the device.
+     177             :   ///
+     178             :   /// Throws a [CameraException] if the initialization fails.
+     179           2 :   Future<void> initialize() async {
+     180           2 :     if (_isDisposed) {
+     181           1 :       throw CameraException(
+     182             :         'Disposed CameraController',
+     183             :         'initialize was called on a disposed CameraController',
+     184             :       );
+     185             :     }
+     186             :     try {
+     187           8 :       _cameraId = await CameraPlatform.instance.createCamera(
+     188           2 :         description,
+     189           2 :         resolutionPreset,
+     190           2 :         enableAudio: enableAudio,
+     191             :       );
+     192             : 
+     193             :       final previewSize =
+     194          10 :           CameraPlatform.instance.onCameraInitialized(_cameraId).map((event) {
+     195           2 :         return Size(
+     196           2 :           event.previewWidth,
+     197           2 :           event.previewHeight,
+     198             :         );
+     199           2 :       }).first;
+     200             : 
+     201           6 :       await CameraPlatform.instance.initializeCamera(
+     202           2 :         _cameraId,
+     203           4 :         imageFormatGroup: imageFormatGroupAsIntegerValue(imageFormatGroup),
+     204             :       );
+     205             : 
+     206           6 :       value = value.copyWith(
+     207             :         isInitialized: true,
+     208           2 :         previewSize: await previewSize,
+     209             :       );
+     210           1 :     } on PlatformException catch (e) {
+     211           3 :       throw CameraException(e.code, e.message);
+     212             :     }
+     213             : 
+     214           2 :     _initCalled = true;
+     215             :   }
+     216             : 
+     217             :   /// Prepare the capture session for video recording.
+     218             :   ///
+     219             :   /// Use of this method is optional, but it may be called for performance
+     220             :   /// reasons on iOS.
+     221             :   ///
+     222             :   /// Preparing audio can cause a minor delay in the CameraPreview view on iOS.
+     223             :   /// If video recording is intended, calling this early eliminates this delay
+     224             :   /// that would otherwise be experienced when video recording is started.
+     225             :   /// This operation is a no-op on Android.
+     226             :   ///
+     227             :   /// Throws a [CameraException] if the prepare fails.
+     228           1 :   Future<void> prepareForVideoRecording() async {
+     229           3 :     await CameraPlatform.instance.prepareForVideoRecording();
+     230             :   }
+     231             : 
+     232             :   /// Captures an image and saves it to [path].
+     233             :   ///
+     234             :   /// A path can for example be obtained using
+     235             :   /// [path_provider](https://pub.dartlang.org/packages/path_provider).
+     236             :   ///
+     237             :   /// If a file already exists at the provided path an error will be thrown.
+     238             :   /// The file can be read as this function returns.
+     239             :   ///
+     240             :   /// Throws a [CameraException] if the capture fails.
+     241           1 :   Future<XFile> takePicture() async {
+     242           3 :     if (!value.isInitialized || _isDisposed) {
+     243           1 :       throw CameraException(
+     244             :         'Uninitialized CameraController.',
+     245             :         'takePicture was called on uninitialized CameraController',
+     246             :       );
+     247             :     }
+     248           2 :     if (value.isTakingPicture) {
+     249           1 :       throw CameraException(
+     250             :         'Previous capture has not returned yet.',
+     251             :         'takePicture was called before the previous capture returned.',
+     252             :       );
+     253             :     }
+     254             :     try {
+     255           3 :       value = value.copyWith(isTakingPicture: true);
+     256           4 :       XFile file = await CameraPlatform.instance.takePicture(_cameraId);
+     257           3 :       value = value.copyWith(isTakingPicture: false);
+     258             :       return file;
+     259           1 :     } on PlatformException catch (e) {
+     260           3 :       value = value.copyWith(isTakingPicture: false);
+     261           3 :       throw CameraException(e.code, e.message);
+     262             :     }
+     263             :   }
+     264             : 
+     265             :   /// Start streaming images from platform camera.
+     266             :   ///
+     267             :   /// Settings for capturing images on iOS and Android is set to always use the
+     268             :   /// latest image available from the camera and will drop all other images.
+     269             :   ///
+     270             :   /// When running continuously with [CameraPreview] widget, this function runs
+     271             :   /// best with [ResolutionPreset.low]. Running on [ResolutionPreset.high] can
+     272             :   /// have significant frame rate drops for [CameraPreview] on lower end
+     273             :   /// devices.
+     274             :   ///
+     275             :   /// Throws a [CameraException] if image streaming or video recording has
+     276             :   /// already started.
+     277             :   ///
+     278             :   /// The `startImageStream` method is only available on Android and iOS (other
+     279             :   /// platforms won't be supported in current setup).
+     280             :   ///
+     281             :   // TODO(bmparr): Add settings for resolution and fps.
+     282           1 :   Future<void> startImageStream(onLatestImageAvailable onAvailable) async {
+     283           2 :     assert(defaultTargetPlatform == TargetPlatform.android ||
+     284           0 :         defaultTargetPlatform == TargetPlatform.iOS);
+     285             : 
+     286           3 :     if (!value.isInitialized || _isDisposed) {
+     287           1 :       throw CameraException(
+     288             :         'Uninitialized CameraController',
+     289             :         'startImageStream was called on uninitialized CameraController.',
+     290             :       );
+     291             :     }
+     292           2 :     if (value.isRecordingVideo) {
+     293           1 :       throw CameraException(
+     294             :         'A video recording is already started.',
+     295             :         'startImageStream was called while a video is being recorded.',
+     296             :       );
+     297             :     }
+     298           2 :     if (value.isStreamingImages) {
+     299           1 :       throw CameraException(
+     300             :         'A camera has started streaming images.',
+     301             :         'startImageStream was called while a camera was streaming images.',
+     302             :       );
+     303             :     }
+     304             : 
+     305             :     try {
+     306           3 :       await _channel.invokeMethod<void>('startImageStream');
+     307           3 :       value = value.copyWith(isStreamingImages: true);
+     308           0 :     } on PlatformException catch (e) {
+     309           0 :       throw CameraException(e.code, e.message);
+     310             :     }
+     311             :     const EventChannel cameraEventChannel =
+     312             :         EventChannel('plugins.flutter.io/camera/imageStream');
+     313           1 :     _imageStreamSubscription =
+     314           2 :         cameraEventChannel.receiveBroadcastStream().listen(
+     315           0 :       (dynamic imageData) {
+     316           0 :         onAvailable(CameraImage.fromPlatformData(imageData));
+     317             :       },
+     318             :     );
+     319             :   }
+     320             : 
+     321             :   /// Stop streaming images from platform camera.
+     322             :   ///
+     323             :   /// Throws a [CameraException] if image streaming was not started or video
+     324             :   /// recording was started.
+     325             :   ///
+     326             :   /// The `stopImageStream` method is only available on Android and iOS (other
+     327             :   /// platforms won't be supported in current setup).
+     328           1 :   Future<void> stopImageStream() async {
+     329           2 :     assert(defaultTargetPlatform == TargetPlatform.android ||
+     330           0 :         defaultTargetPlatform == TargetPlatform.iOS);
+     331             : 
+     332           3 :     if (!value.isInitialized || _isDisposed) {
+     333           1 :       throw CameraException(
+     334             :         'Uninitialized CameraController',
+     335             :         'stopImageStream was called on uninitialized CameraController.',
+     336             :       );
+     337             :     }
+     338           2 :     if (value.isRecordingVideo) {
+     339           1 :       throw CameraException(
+     340             :         'A video recording is already started.',
+     341             :         'stopImageStream was called while a video is being recorded.',
+     342             :       );
+     343             :     }
+     344           2 :     if (!value.isStreamingImages) {
+     345           1 :       throw CameraException(
+     346             :         'No camera is streaming images',
+     347             :         'stopImageStream was called when no camera is streaming images.',
+     348             :       );
+     349             :     }
+     350             : 
+     351             :     try {
+     352           3 :       value = value.copyWith(isStreamingImages: false);
+     353           3 :       await _channel.invokeMethod<void>('stopImageStream');
+     354           0 :     } on PlatformException catch (e) {
+     355           0 :       throw CameraException(e.code, e.message);
+     356             :     }
+     357             : 
+     358           3 :     await _imageStreamSubscription.cancel();
+     359           1 :     _imageStreamSubscription = null;
+     360             :   }
+     361             : 
+     362             :   /// Start a video recording.
+     363             :   ///
+     364             :   /// The video is returned as a [XFile] after calling [stopVideoRecording].
+     365             :   /// Throws a [CameraException] if the capture fails.
+     366           1 :   Future<void> startVideoRecording() async {
+     367           3 :     if (!value.isInitialized || _isDisposed) {
+     368           1 :       throw CameraException(
+     369             :         'Uninitialized CameraController',
+     370             :         'startVideoRecording was called on uninitialized CameraController',
+     371             :       );
+     372             :     }
+     373           2 :     if (value.isRecordingVideo) {
+     374           1 :       throw CameraException(
+     375             :         'A video recording is already started.',
+     376             :         'startVideoRecording was called when a recording is already started.',
+     377             :       );
+     378             :     }
+     379           2 :     if (value.isStreamingImages) {
+     380           1 :       throw CameraException(
+     381             :         'A camera has started streaming images.',
+     382             :         'startVideoRecording was called while a camera was streaming images.',
+     383             :       );
+     384             :     }
+     385             : 
+     386             :     try {
+     387           0 :       await CameraPlatform.instance.startVideoRecording(_cameraId);
+     388           0 :       value = value.copyWith(isRecordingVideo: true, isRecordingPaused: false);
+     389           0 :     } on PlatformException catch (e) {
+     390           0 :       throw CameraException(e.code, e.message);
+     391             :     }
+     392             :   }
+     393             : 
+     394             :   /// Stops the video recording and returns the file where it was saved.
+     395             :   ///
+     396             :   /// Throws a [CameraException] if the capture failed.
+     397           0 :   Future<XFile> stopVideoRecording() async {
+     398           0 :     if (!value.isInitialized || _isDisposed) {
+     399           0 :       throw CameraException(
+     400             :         'Uninitialized CameraController',
+     401             :         'stopVideoRecording was called on uninitialized CameraController',
+     402             :       );
+     403             :     }
+     404           0 :     if (!value.isRecordingVideo) {
+     405           0 :       throw CameraException(
+     406             :         'No video is recording',
+     407             :         'stopVideoRecording was called when no video is recording.',
+     408             :       );
+     409             :     }
+     410             :     try {
+     411           0 :       XFile file = await CameraPlatform.instance.stopVideoRecording(_cameraId);
+     412           0 :       value = value.copyWith(isRecordingVideo: false);
+     413             :       return file;
+     414           0 :     } on PlatformException catch (e) {
+     415           0 :       throw CameraException(e.code, e.message);
+     416             :     }
+     417             :   }
+     418             : 
+     419             :   /// Pause video recording.
+     420             :   ///
+     421             :   /// This feature is only available on iOS and Android sdk 24+.
+     422           0 :   Future<void> pauseVideoRecording() async {
+     423           0 :     if (!value.isInitialized || _isDisposed) {
+     424           0 :       throw CameraException(
+     425             :         'Uninitialized CameraController',
+     426             :         'pauseVideoRecording was called on uninitialized CameraController',
+     427             :       );
+     428             :     }
+     429           0 :     if (!value.isRecordingVideo) {
+     430           0 :       throw CameraException(
+     431             :         'No video is recording',
+     432             :         'pauseVideoRecording was called when no video is recording.',
+     433             :       );
+     434             :     }
+     435             :     try {
+     436           0 :       await CameraPlatform.instance.pauseVideoRecording(_cameraId);
+     437           0 :       value = value.copyWith(isRecordingPaused: true);
+     438           0 :     } on PlatformException catch (e) {
+     439           0 :       throw CameraException(e.code, e.message);
+     440             :     }
+     441             :   }
+     442             : 
+     443             :   /// Resume video recording after pausing.
+     444             :   ///
+     445             :   /// This feature is only available on iOS and Android sdk 24+.
+     446           0 :   Future<void> resumeVideoRecording() async {
+     447           0 :     if (!value.isInitialized || _isDisposed) {
+     448           0 :       throw CameraException(
+     449             :         'Uninitialized CameraController',
+     450             :         'resumeVideoRecording was called on uninitialized CameraController',
+     451             :       );
+     452             :     }
+     453           0 :     if (!value.isRecordingVideo) {
+     454           0 :       throw CameraException(
+     455             :         'No video is recording',
+     456             :         'resumeVideoRecording was called when no video is recording.',
+     457             :       );
+     458             :     }
+     459             :     try {
+     460           0 :       await CameraPlatform.instance.resumeVideoRecording(_cameraId);
+     461           0 :       value = value.copyWith(isRecordingPaused: false);
+     462           0 :     } on PlatformException catch (e) {
+     463           0 :       throw CameraException(e.code, e.message);
+     464             :     }
+     465             :   }
+     466             : 
+     467             :   /// Returns a widget showing a live camera preview.
+     468           0 :   Widget buildPreview() {
+     469           0 :     if (!value.isInitialized || _isDisposed) {
+     470           0 :       throw CameraException(
+     471             :         'Uninitialized CameraController',
+     472             :         'buildView() was called on uninitialized CameraController.',
+     473             :       );
+     474             :     }
+     475             :     try {
+     476           0 :       return CameraPlatform.instance.buildPreview(_cameraId);
+     477           0 :     } on PlatformException catch (e) {
+     478           0 :       throw CameraException(e.code, e.message);
+     479             :     }
+     480             :   }
+     481             : 
+     482             :   /// Releases the resources of this camera.
+     483             :   @override
+     484           1 :   Future<void> dispose() async {
+     485           1 :     if (_isDisposed) {
+     486             :       return;
+     487             :     }
+     488           1 :     _isDisposed = true;
+     489           1 :     super.dispose();
+     490           1 :     if (_initCalled != null) {
+     491           2 :       await _initCalled;
+     492           4 :       await CameraPlatform.instance.dispose(_cameraId);
+     493             :     }
+     494             :   }
+     495             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/camera_image.dart.func-sort-c.html b/packages/camera/camera/coverage/html/src/camera_image.dart.func-sort-c.html new file mode 100644 index 000000000000..fefdd9fed353 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_image.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - src/camera_image.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_image.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:242596.0 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/camera_image.dart.func.html b/packages/camera/camera/coverage/html/src/camera_image.dart.func.html new file mode 100644 index 000000000000..511bf58dbbca --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_image.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - src/camera_image.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_image.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:242596.0 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/camera_image.dart.gcov.html b/packages/camera/camera/coverage/html/src/camera_image.dart.gcov.html new file mode 100644 index 000000000000..e656f3582c13 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_image.dart.gcov.html @@ -0,0 +1,235 @@ + + + + + + + LCOV - lcov.info - src/camera_image.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_image.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:242596.0 %
Date:2020-12-22 12:19:05Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : import 'dart:typed_data';
+       6             : 
+       7             : import 'package:flutter/foundation.dart';
+       8             : import 'package:flutter/material.dart';
+       9             : 
+      10             : /// A single color plane of image data.
+      11             : ///
+      12             : /// The number and meaning of the planes in an image are determined by the
+      13             : /// format of the Image.
+      14             : class Plane {
+      15           1 :   Plane._fromPlatformData(Map<dynamic, dynamic> data)
+      16           1 :       : bytes = data['bytes'],
+      17           1 :         bytesPerPixel = data['bytesPerPixel'],
+      18           1 :         bytesPerRow = data['bytesPerRow'],
+      19           1 :         height = data['height'],
+      20           1 :         width = data['width'];
+      21             : 
+      22             :   /// Bytes representing this plane.
+      23             :   final Uint8List bytes;
+      24             : 
+      25             :   /// The distance between adjacent pixel samples on Android, in bytes.
+      26             :   ///
+      27             :   /// Will be `null` on iOS.
+      28             :   final int bytesPerPixel;
+      29             : 
+      30             :   /// The row stride for this color plane, in bytes.
+      31             :   final int bytesPerRow;
+      32             : 
+      33             :   /// Height of the pixel buffer on iOS.
+      34             :   ///
+      35             :   /// Will be `null` on Android
+      36             :   final int height;
+      37             : 
+      38             :   /// Width of the pixel buffer on iOS.
+      39             :   ///
+      40             :   /// Will be `null` on Android.
+      41             :   final int width;
+      42             : }
+      43             : 
+      44             : // TODO:(bmparr) Turn [ImageFormatGroup] to a class with int values.
+      45             : /// Group of image formats that are comparable across Android and iOS platforms.
+      46           4 : enum ImageFormatGroup {
+      47             :   /// The image format does not fit into any specific group.
+      48           4 :   unknown,
+      49             : 
+      50             :   /// Multi-plane YUV 420 format.
+      51             :   ///
+      52             :   /// This format is a generic YCbCr format, capable of describing any 4:2:0
+      53             :   /// chroma-subsampled planar or semiplanar buffer (but not fully interleaved),
+      54             :   /// with 8 bits per color sample.
+      55             :   ///
+      56             :   /// On Android, this is `android.graphics.ImageFormat.YUV_420_888`. See
+      57             :   /// https://developer.android.com/reference/android/graphics/ImageFormat.html#YUV_420_888
+      58             :   ///
+      59             :   /// On iOS, this is `kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange`. See
+      60             :   /// https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_420ypcbcr8biplanarvideorange?language=objc
+      61           4 :   yuv420,
+      62             : 
+      63             :   /// 32-bit BGRA.
+      64             :   ///
+      65             :   /// On iOS, this is `kCVPixelFormatType_32BGRA`. See
+      66             :   /// https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_32bgra?language=objc
+      67           4 :   bgra8888,
+      68             : 
+      69             :   /// 32-big RGB image encoded into JPEG bytes.
+      70             :   ///
+      71             :   /// On Android, this is `android.graphics.ImageFormat.JPEG`. See
+      72             :   /// https://developer.android.com/reference/android/graphics/ImageFormat#JPEG
+      73           4 :   jpeg,
+      74             : }
+      75             : 
+      76             : /// Describes how pixels are represented in an image.
+      77             : class ImageFormat {
+      78           2 :   ImageFormat._fromPlatformData(this.raw) : group = _asImageFormatGroup(raw);
+      79             : 
+      80             :   /// Describes the format group the raw image format falls into.
+      81             :   final ImageFormatGroup group;
+      82             : 
+      83             :   /// Raw version of the format from the Android or iOS platform.
+      84             :   ///
+      85             :   /// On Android, this is an `int` from class `android.graphics.ImageFormat`. See
+      86             :   /// https://developer.android.com/reference/android/graphics/ImageFormat
+      87             :   ///
+      88             :   /// On iOS, this is a `FourCharCode` constant from Pixel Format Identifiers.
+      89             :   /// See https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers?language=objc
+      90             :   final dynamic raw;
+      91             : }
+      92             : 
+      93           1 : ImageFormatGroup _asImageFormatGroup(dynamic rawFormat) {
+      94           2 :   if (defaultTargetPlatform == TargetPlatform.android) {
+      95             :     switch (rawFormat) {
+      96             :     // android.graphics.ImageFormat.YUV_420_888
+      97           1 :       case 35:
+      98             :         return ImageFormatGroup.yuv420;
+      99             :     // android.graphics.ImageFormat.JPEG
+     100           0 :       case 256:
+     101             :         return ImageFormatGroup.jpeg;
+     102             :     }
+     103             :   }
+     104             : 
+     105           2 :   if (defaultTargetPlatform == TargetPlatform.iOS) {
+     106             :     switch (rawFormat) {
+     107             :       // kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
+     108           1 :       case 875704438:
+     109             :         return ImageFormatGroup.yuv420;
+     110             :       // kCVPixelFormatType_32BGRA
+     111           1 :       case 1111970369:
+     112             :         return ImageFormatGroup.bgra8888;
+     113             :     }
+     114             :   }
+     115             : 
+     116             :   return ImageFormatGroup.unknown;
+     117             : }
+     118             : 
+     119             : /// A single complete image buffer from the platform camera.
+     120             : ///
+     121             : /// This class allows for direct application access to the pixel data of an
+     122             : /// Image through one or more [Uint8List]. Each buffer is encapsulated in a
+     123             : /// [Plane] that describes the layout of the pixel data in that plane. The
+     124             : /// [CameraImage] is not directly usable as a UI resource.
+     125             : ///
+     126             : /// Although not all image formats are planar on iOS, we treat 1-dimensional
+     127             : /// images as single planar images.
+     128             : class CameraImage {
+     129             :   /// CameraImage Constructor
+     130           1 :   CameraImage.fromPlatformData(Map<dynamic, dynamic> data)
+     131           2 :       : format = ImageFormat._fromPlatformData(data['format']),
+     132           1 :         height = data['height'],
+     133           1 :         width = data['width'],
+     134           2 :         planes = List<Plane>.unmodifiable(data['planes']
+     135           3 :             .map((dynamic planeData) => Plane._fromPlatformData(planeData)));
+     136             : 
+     137             :   /// Format of the image provided.
+     138             :   ///
+     139             :   /// Determines the number of planes needed to represent the image, and
+     140             :   /// the general layout of the pixel data in each [Uint8List].
+     141             :   final ImageFormat format;
+     142             : 
+     143             :   /// Height of the image in pixels.
+     144             :   ///
+     145             :   /// For formats where some color channels are subsampled, this is the height
+     146             :   /// of the largest-resolution plane.
+     147             :   final int height;
+     148             : 
+     149             :   /// Width of the image in pixels.
+     150             :   ///
+     151             :   /// For formats where some color channels are subsampled, this is the width
+     152             :   /// of the largest-resolution plane.
+     153             :   final int width;
+     154             : 
+     155             :   /// The pixels planes for this image.
+     156             :   ///
+     157             :   /// The number of planes is determined by the format of the image.
+     158             :   final List<Plane> planes;
+     159             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/camera_preview.dart.func-sort-c.html b/packages/camera/camera/coverage/html/src/camera_preview.dart.func-sort-c.html new file mode 100644 index 000000000000..c7055370b284 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_preview.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - src/camera_preview.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_preview.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:050.0 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/camera_preview.dart.func.html b/packages/camera/camera/coverage/html/src/camera_preview.dart.func.html new file mode 100644 index 000000000000..c07db81fc4a5 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_preview.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - src/camera_preview.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_preview.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:050.0 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/camera_preview.dart.gcov.html b/packages/camera/camera/coverage/html/src/camera_preview.dart.gcov.html new file mode 100644 index 000000000000..2ebf3a14f177 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/camera_preview.dart.gcov.html @@ -0,0 +1,99 @@ + + + + + + + LCOV - lcov.info - src/camera_preview.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - src - camera_preview.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:050.0 %
Date:2020-12-22 12:19:05Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : import 'package:camera/camera.dart';
+       6             : import 'package:camera_platform_interface/camera_platform_interface.dart';
+       7             : import 'package:flutter/material.dart';
+       8             : 
+       9             : /// A widget showing a live camera preview.
+      10             : class CameraPreview extends StatelessWidget {
+      11             :   /// Creates a preview widget for the given camera controller.
+      12           0 :   const CameraPreview(this.controller);
+      13             : 
+      14             :   /// The controller for the camera that the preview is shown for.
+      15             :   final CameraController controller;
+      16             : 
+      17           0 :   @override
+      18             :   Widget build(BuildContext context) {
+      19           0 :     return controller.value.isInitialized
+      20           0 :         ? CameraPlatform.instance.buildPreview(controller.cameraId)
+      21           0 :         : Container();
+      22             :   }
+      23             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/index-sort-f.html b/packages/camera/camera/coverage/html/src/index-sort-f.html new file mode 100644 index 000000000000..deb29d38b329 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/index-sort-f.html @@ -0,0 +1,113 @@ + + + + + + + LCOV - lcov.info - src + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - srcHitTotalCoverage
Test:lcov.infoLines:12117569.1 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_controller.dart +
66.9%66.9%
+
66.9 %97 / 145-0 / 0
camera_image.dart +
96.0%96.0%
+
96.0 %24 / 25-0 / 0
camera_preview.dart +
0.0%
+
0.0 %0 / 5-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/index-sort-l.html b/packages/camera/camera/coverage/html/src/index-sort-l.html new file mode 100644 index 000000000000..0d181ec8c267 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/index-sort-l.html @@ -0,0 +1,113 @@ + + + + + + + LCOV - lcov.info - src + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - srcHitTotalCoverage
Test:lcov.infoLines:12117569.1 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_preview.dart +
0.0%
+
0.0 %0 / 5-0 / 0
camera_controller.dart +
66.9%66.9%
+
66.9 %97 / 145-0 / 0
camera_image.dart +
96.0%96.0%
+
96.0 %24 / 25-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/src/index.html b/packages/camera/camera/coverage/html/src/index.html new file mode 100644 index 000000000000..a1ee5b00c3c2 --- /dev/null +++ b/packages/camera/camera/coverage/html/src/index.html @@ -0,0 +1,113 @@ + + + + + + + LCOV - lcov.info - src + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - srcHitTotalCoverage
Test:lcov.infoLines:12117569.1 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_controller.dart +
66.9%66.9%
+
66.9 %97 / 145-0 / 0
camera_image.dart +
96.0%96.0%
+
96.0 %24 / 25-0 / 0
camera_preview.dart +
0.0%
+
0.0 %0 / 5-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/updown.png b/packages/camera/camera/coverage/html/updown.png new file mode 100644 index 0000000000000000000000000000000000000000..aa56a238b3e6c435265250f9266cd1b8caba0f20 GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`*?77*hG?8mPH5^{)z4*}Q$iB}huR`+ literal 0 HcmV?d00001 diff --git a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func-sort-c.html b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func-sort-c.html new file mode 100644 index 000000000000..04d7f26df83c --- /dev/null +++ b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - utils/image_format_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - image_format_utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func.html b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func.html new file mode 100644 index 000000000000..956628711a03 --- /dev/null +++ b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - utils/image_format_utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - image_format_utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.gcov.html b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.gcov.html new file mode 100644 index 000000000000..bdc6a0cd7464 --- /dev/null +++ b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.gcov.html @@ -0,0 +1,110 @@ + + + + + + + LCOV - lcov.info - utils/image_format_utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - image_format_utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : import 'package:flutter/foundation.dart';
+       2             : 
+       3             : import '../camera.dart';
+       4             : 
+       5             : /// Converts [ImageFormatGroup] to integer definition of the raw format
+       6           2 : int imageFormatGroupAsIntegerValue(ImageFormatGroup imageFormatGroup) {
+       7           4 :   if (defaultTargetPlatform == TargetPlatform.iOS) {
+       8             :     switch (imageFormatGroup) {
+       9             :     // kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
+      10           0 :       case ImageFormatGroup.yuv420:
+      11             :         return 875704438;
+      12             :     // kCVPixelFormatType_32BGRA
+      13           0 :       case ImageFormatGroup.bgra8888:
+      14             :         return 1111970369;
+      15           0 :       case ImageFormatGroup.jpeg:
+      16           0 :       case ImageFormatGroup.unknown:
+      17             :         return 0;
+      18             :     }
+      19           4 :   } else if (defaultTargetPlatform == TargetPlatform.android) {
+      20             :     switch (imageFormatGroup) {
+      21             :     // kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
+      22           2 :       case ImageFormatGroup.yuv420:
+      23             :         return 35;
+      24             :     // kCVPixelFormatType_32BGRA
+      25           2 :       case ImageFormatGroup.bgra8888:
+      26           2 :       case ImageFormatGroup.unknown:
+      27             :         return 0;
+      28           2 :       case ImageFormatGroup.jpeg:
+      29             :         return 256;
+      30             :     }
+      31             :   }
+      32             :   // unknown ImageFormatGroup or unsupported platform
+      33             :   return 0;
+      34             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/utils/index-sort-f.html b/packages/camera/camera/coverage/html/utils/index-sort-f.html new file mode 100644 index 000000000000..99b8bf36fba2 --- /dev/null +++ b/packages/camera/camera/coverage/html/utils/index-sort-f.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
image_format_utils.dart +
63.6%63.6%
+
63.6 %7 / 11-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/utils/index-sort-l.html b/packages/camera/camera/coverage/html/utils/index-sort-l.html new file mode 100644 index 000000000000..ca0a452dbdbc --- /dev/null +++ b/packages/camera/camera/coverage/html/utils/index-sort-l.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
image_format_utils.dart +
63.6%63.6%
+
63.6 %7 / 11-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/html/utils/index.html b/packages/camera/camera/coverage/html/utils/index.html new file mode 100644 index 000000000000..dda2e0cb3f35 --- /dev/null +++ b/packages/camera/camera/coverage/html/utils/index.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
image_format_utils.dart +
63.6%63.6%
+
63.6 %7 / 11-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera/coverage/lcov.info b/packages/camera/camera/coverage/lcov.info new file mode 100644 index 000000000000..01f6f5977837 --- /dev/null +++ b/packages/camera/camera/coverage/lcov.info @@ -0,0 +1,202 @@ +SF:lib/src/camera_controller.dart +DA:15,2 +DA:26,1 +DA:27,2 +DA:33,3 +DA:44,0 +DA:45,0 +DA:68,2 +DA:84,12 +DA:89,2 +DA:95,3 +DA:104,3 +DA:105,3 +DA:107,3 +DA:108,3 +DA:109,3 +DA:110,3 +DA:111,3 +DA:115,1 +DA:117,2 +DA:118,1 +DA:119,1 +DA:120,1 +DA:121,1 +DA:122,1 +DA:135,2 +DA:140,2 +DA:169,1 +DA:170,1 +DA:174,0 +DA:179,2 +DA:180,2 +DA:181,1 +DA:187,8 +DA:188,2 +DA:189,2 +DA:190,2 +DA:194,10 +DA:195,2 +DA:196,2 +DA:197,2 +DA:199,2 +DA:201,6 +DA:202,2 +DA:203,4 +DA:206,6 +DA:208,2 +DA:210,1 +DA:211,3 +DA:214,2 +DA:228,1 +DA:229,3 +DA:241,1 +DA:242,3 +DA:243,1 +DA:248,2 +DA:249,1 +DA:255,3 +DA:256,4 +DA:257,3 +DA:259,1 +DA:260,3 +DA:261,3 +DA:282,1 +DA:283,2 +DA:284,0 +DA:286,3 +DA:287,1 +DA:292,2 +DA:293,1 +DA:298,2 +DA:299,1 +DA:306,3 +DA:307,3 +DA:308,0 +DA:309,0 +DA:313,1 +DA:314,2 +DA:315,0 +DA:316,0 +DA:328,1 +DA:329,2 +DA:330,0 +DA:332,3 +DA:333,1 +DA:338,2 +DA:339,1 +DA:344,2 +DA:345,1 +DA:352,3 +DA:353,3 +DA:354,0 +DA:355,0 +DA:358,3 +DA:359,1 +DA:366,1 +DA:367,3 +DA:368,1 +DA:373,2 +DA:374,1 +DA:379,2 +DA:380,1 +DA:387,0 +DA:388,0 +DA:389,0 +DA:390,0 +DA:397,0 +DA:398,0 +DA:399,0 +DA:404,0 +DA:405,0 +DA:411,0 +DA:412,0 +DA:414,0 +DA:415,0 +DA:422,0 +DA:423,0 +DA:424,0 +DA:429,0 +DA:430,0 +DA:436,0 +DA:437,0 +DA:438,0 +DA:439,0 +DA:446,0 +DA:447,0 +DA:448,0 +DA:453,0 +DA:454,0 +DA:460,0 +DA:461,0 +DA:462,0 +DA:463,0 +DA:468,0 +DA:469,0 +DA:470,0 +DA:476,0 +DA:477,0 +DA:478,0 +DA:484,1 +DA:485,1 +DA:488,1 +DA:489,1 +DA:490,1 +DA:491,2 +DA:492,4 +LF:145 +LH:97 +end_of_record +SF:lib/src/camera_image.dart +DA:15,1 +DA:16,1 +DA:17,1 +DA:18,1 +DA:19,1 +DA:20,1 +DA:46,4 +DA:48,4 +DA:61,4 +DA:67,4 +DA:73,4 +DA:78,2 +DA:93,1 +DA:94,2 +DA:97,1 +DA:100,0 +DA:105,2 +DA:108,1 +DA:111,1 +DA:130,1 +DA:131,2 +DA:132,1 +DA:133,1 +DA:134,2 +DA:135,3 +LF:25 +LH:24 +end_of_record +SF:lib/src/camera_preview.dart +DA:12,0 +DA:17,0 +DA:19,0 +DA:20,0 +DA:21,0 +LF:5 +LH:0 +end_of_record +SF:lib/utils/image_format_utils.dart +DA:6,2 +DA:7,4 +DA:10,0 +DA:13,0 +DA:15,0 +DA:16,0 +DA:19,4 +DA:22,2 +DA:25,2 +DA:26,2 +DA:28,2 +LF:11 +LH:7 +end_of_record diff --git a/packages/camera/camera_platform_interface/coverage/html/amber.png b/packages/camera/camera_platform_interface/coverage/html/amber.png new file mode 100644 index 0000000000000000000000000000000000000000..2cab170d8359081983a4e343848dfe06bc490f12 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^G2tW}LqE04T&+ z;1OBOz`!j8!i<;h*8KqrvZOouIx;Y9?C1WI$O`1M1^9%x{(levWG?NMQuI!iC1^Jb!lvI6;R0X`wF(yt=9xVZRt1vCRixIA4P dLn>}1Cji+@42)0J?}79&c)I$ztaD0e0sy@GAL0N2 literal 0 HcmV?d00001 diff --git a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func-sort-c.html new file mode 100644 index 000000000000..4652b3310893 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - events/camera_event.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - events - camera_event.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func.html new file mode 100644 index 000000000000..a65e45c8e004 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - events/camera_event.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - events - camera_event.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.gcov.html new file mode 100644 index 000000000000..fdd195c34b27 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.gcov.html @@ -0,0 +1,274 @@ + + + + + + + LCOV - lcov.info - events/camera_event.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - events - camera_event.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2019 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : /// Generic Event coming from the native side of Camera.
+       6             : ///
+       7             : /// All [CameraEvent]s contain the `cameraId` that originated the event. This
+       8             : /// should never be `null`.
+       9             : ///
+      10             : /// This class is used as a base class for all the events that might be
+      11             : /// triggered from a Camera, but it is never used directly as an event type.
+      12             : ///
+      13             : /// Do NOT instantiate new events like `CameraEvent(cameraId)` directly,
+      14             : /// use a specific class instead:
+      15             : ///
+      16             : /// Do `class NewEvent extend CameraEvent` when creating your own events.
+      17             : /// See below for examples: `CameraClosingEvent`, `CameraErrorEvent`...
+      18             : /// These events are more semantic and more pleasant to use than raw generics.
+      19             : /// They can be (and in fact, are) filtered by the `instanceof`-operator.
+      20             : abstract class CameraEvent {
+      21             :   /// The ID of the Camera this event is associated to.
+      22             :   final int cameraId;
+      23             : 
+      24             :   /// Build a Camera Event, that relates a `cameraId`.
+      25             :   ///
+      26             :   /// The `cameraId` is the ID of the camera that triggered the event.
+      27           2 :   CameraEvent(this.cameraId) : assert(cameraId != null);
+      28             : 
+      29           2 :   @override
+      30             :   bool operator ==(Object other) =>
+      31             :       identical(this, other) ||
+      32           2 :       other is CameraEvent &&
+      33           6 :           runtimeType == other.runtimeType &&
+      34           6 :           cameraId == other.cameraId;
+      35             : 
+      36           1 :   @override
+      37           2 :   int get hashCode => cameraId.hashCode;
+      38             : }
+      39             : 
+      40             : /// An event fired when the camera has finished initializing.
+      41             : class CameraInitializedEvent extends CameraEvent {
+      42             :   /// The width of the preview in pixels.
+      43             :   final double previewWidth;
+      44             : 
+      45             :   /// The height of the preview in pixels.
+      46             :   final double previewHeight;
+      47             : 
+      48             :   /// Build a CameraInitialized event triggered from the camera represented by
+      49             :   /// `cameraId`.
+      50             :   ///
+      51             :   /// The `previewWidth` represents the width of the generated preview in pixels.
+      52             :   /// The `previewHeight` represents the height of the generated preview in pixels.
+      53           2 :   CameraInitializedEvent(
+      54             :     int cameraId,
+      55             :     this.previewWidth,
+      56             :     this.previewHeight,
+      57           2 :   ) : super(cameraId);
+      58             : 
+      59             :   /// Converts the supplied [Map] to an instance of the [CameraInitializedEvent]
+      60             :   /// class.
+      61           1 :   CameraInitializedEvent.fromJson(Map<String, dynamic> json)
+      62           1 :       : previewWidth = json['previewWidth'],
+      63           1 :         previewHeight = json['previewHeight'],
+      64           2 :         super(json['cameraId']);
+      65             : 
+      66             :   /// Converts the [CameraInitializedEvent] instance into a [Map] instance that
+      67             :   /// can be serialized to JSON.
+      68           4 :   Map<String, dynamic> toJson() => {
+      69           2 :         'cameraId': cameraId,
+      70           2 :         'previewWidth': previewWidth,
+      71           2 :         'previewHeight': previewHeight,
+      72             :       };
+      73             : 
+      74           2 :   @override
+      75             :   bool operator ==(Object other) =>
+      76             :       identical(this, other) ||
+      77           2 :       super == other &&
+      78           2 :           other is CameraInitializedEvent &&
+      79           6 :           runtimeType == other.runtimeType &&
+      80           6 :           previewWidth == other.previewWidth &&
+      81           6 :           previewHeight == other.previewHeight;
+      82             : 
+      83           1 :   @override
+      84             :   int get hashCode =>
+      85           7 :       super.hashCode ^ previewWidth.hashCode ^ previewHeight.hashCode;
+      86             : }
+      87             : 
+      88             : /// An event fired when the resolution preset of the camera has changed.
+      89             : class CameraResolutionChangedEvent extends CameraEvent {
+      90             :   /// The capture width in pixels.
+      91             :   final double captureWidth;
+      92             : 
+      93             :   /// The capture height in pixels.
+      94             :   final double captureHeight;
+      95             : 
+      96             :   /// Build a CameraResolutionChanged event triggered from the camera
+      97             :   /// represented by `cameraId`.
+      98             :   ///
+      99             :   /// The `captureWidth` represents the width of the resulting image in pixels.
+     100             :   /// The `captureHeight` represents the height of the resulting image in pixels.
+     101           2 :   CameraResolutionChangedEvent(
+     102             :     int cameraId,
+     103             :     this.captureWidth,
+     104             :     this.captureHeight,
+     105           2 :   ) : super(cameraId);
+     106             : 
+     107             :   /// Converts the supplied [Map] to an instance of the
+     108             :   /// [CameraResolutionChangedEvent] class.
+     109           1 :   CameraResolutionChangedEvent.fromJson(Map<String, dynamic> json)
+     110           1 :       : captureWidth = json['captureWidth'],
+     111           1 :         captureHeight = json['captureHeight'],
+     112           2 :         super(json['cameraId']);
+     113             : 
+     114             :   /// Converts the [CameraResolutionChangedEvent] instance into a [Map] instance
+     115             :   /// that can be serialized to JSON.
+     116           4 :   Map<String, dynamic> toJson() => {
+     117           2 :         'cameraId': cameraId,
+     118           2 :         'captureWidth': captureWidth,
+     119           2 :         'captureHeight': captureHeight,
+     120             :       };
+     121             : 
+     122           2 :   @override
+     123             :   bool operator ==(Object other) =>
+     124             :       identical(this, other) ||
+     125           2 :       other is CameraResolutionChangedEvent &&
+     126           2 :           super == (other) &&
+     127           6 :           runtimeType == other.runtimeType &&
+     128           6 :           captureWidth == other.captureWidth &&
+     129           6 :           captureHeight == other.captureHeight;
+     130             : 
+     131           1 :   @override
+     132             :   int get hashCode =>
+     133           7 :       super.hashCode ^ captureWidth.hashCode ^ captureHeight.hashCode;
+     134             : }
+     135             : 
+     136             : /// An event fired when the camera is going to close.
+     137             : class CameraClosingEvent extends CameraEvent {
+     138             :   /// Build a CameraClosing event triggered from the camera represented by
+     139             :   /// `cameraId`.
+     140           4 :   CameraClosingEvent(int cameraId) : super(cameraId);
+     141             : 
+     142             :   /// Converts the supplied [Map] to an instance of the [CameraClosingEvent]
+     143             :   /// class.
+     144           1 :   CameraClosingEvent.fromJson(Map<String, dynamic> json)
+     145           2 :       : super(json['cameraId']);
+     146             : 
+     147             :   /// Converts the [CameraClosingEvent] instance into a [Map] instance that can
+     148             :   /// be serialized to JSON.
+     149           4 :   Map<String, dynamic> toJson() => {
+     150           2 :         'cameraId': cameraId,
+     151             :       };
+     152             : 
+     153           2 :   @override
+     154             :   bool operator ==(Object other) =>
+     155             :       identical(this, other) ||
+     156           2 :       super == (other) &&
+     157           2 :           other is CameraClosingEvent &&
+     158           6 :           runtimeType == other.runtimeType;
+     159             : 
+     160           1 :   @override
+     161           1 :   int get hashCode => super.hashCode;
+     162             : }
+     163             : 
+     164             : /// An event fired when an error occured while operating the camera.
+     165             : class CameraErrorEvent extends CameraEvent {
+     166             :   /// Description of the error.
+     167             :   final String description;
+     168             : 
+     169             :   /// Build a CameraError event triggered from the camera represented by
+     170             :   /// `cameraId`.
+     171             :   ///
+     172             :   /// The `description` represents the error occured on the camera.
+     173           4 :   CameraErrorEvent(int cameraId, this.description) : super(cameraId);
+     174             : 
+     175             :   /// Converts the supplied [Map] to an instance of the [CameraErrorEvent]
+     176             :   /// class.
+     177           1 :   CameraErrorEvent.fromJson(Map<String, dynamic> json)
+     178           1 :       : description = json['description'],
+     179           2 :         super(json['cameraId']);
+     180             : 
+     181             :   /// Converts the [CameraErrorEvent] instance into a [Map] instance that can be
+     182             :   /// serialized to JSON.
+     183           4 :   Map<String, dynamic> toJson() => {
+     184           2 :         'cameraId': cameraId,
+     185           2 :         'description': description,
+     186             :       };
+     187             : 
+     188           2 :   @override
+     189             :   bool operator ==(Object other) =>
+     190             :       identical(this, other) ||
+     191           2 :       super == (other) &&
+     192           2 :           other is CameraErrorEvent &&
+     193           6 :           runtimeType == other.runtimeType &&
+     194           6 :           description == other.description;
+     195             : 
+     196           1 :   @override
+     197           4 :   int get hashCode => super.hashCode ^ description.hashCode;
+     198             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/events/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/events/index-sort-f.html new file mode 100644 index 000000000000..6a31953491ea --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/events/index-sort-f.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - events + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - eventsHitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_event.dart +
100.0%
+
100.0 %68 / 68-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/events/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/events/index-sort-l.html new file mode 100644 index 000000000000..0ef6d55f8895 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/events/index-sort-l.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - events + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - eventsHitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_event.dart +
100.0%
+
100.0 %68 / 68-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/events/index.html b/packages/camera/camera_platform_interface/coverage/html/events/index.html new file mode 100644 index 000000000000..a71f1bb81549 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/events/index.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - events + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - eventsHitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_event.dart +
100.0%
+
100.0 %68 / 68-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/gcov.css b/packages/camera/camera_platform_interface/coverage/html/gcov.css new file mode 100644 index 000000000000..bfd0a83e10b5 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/gcov.css @@ -0,0 +1,519 @@ +/* All views: initial background and text color */ +body +{ + color: #000000; + background-color: #FFFFFF; +} + +/* All views: standard link format*/ +a:link +{ + color: #284FA8; + text-decoration: underline; +} + +/* All views: standard link - visited format */ +a:visited +{ + color: #00CB40; + text-decoration: underline; +} + +/* All views: standard link - activated format */ +a:active +{ + color: #FF0040; + text-decoration: underline; +} + +/* All views: main title format */ +td.title +{ + text-align: center; + padding-bottom: 10px; + font-family: sans-serif; + font-size: 20pt; + font-style: italic; + font-weight: bold; +} + +/* All views: header item format */ +td.headerItem +{ + text-align: right; + padding-right: 6px; + font-family: sans-serif; + font-weight: bold; + vertical-align: top; + white-space: nowrap; +} + +/* All views: header item value format */ +td.headerValue +{ + text-align: left; + color: #284FA8; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; +} + +/* All views: header item coverage table heading */ +td.headerCovTableHead +{ + text-align: center; + padding-right: 6px; + padding-left: 6px; + padding-bottom: 0px; + font-family: sans-serif; + font-size: 80%; + white-space: nowrap; +} + +/* All views: header item coverage table entry */ +td.headerCovTableEntry +{ + text-align: right; + color: #284FA8; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #DAE7FE; +} + +/* All views: header item coverage table entry for high coverage rate */ +td.headerCovTableEntryHi +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #A7FC9D; +} + +/* All views: header item coverage table entry for medium coverage rate */ +td.headerCovTableEntryMed +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #FFEA20; +} + +/* All views: header item coverage table entry for ow coverage rate */ +td.headerCovTableEntryLo +{ + text-align: right; + color: #000000; + font-family: sans-serif; + font-weight: bold; + white-space: nowrap; + padding-left: 12px; + padding-right: 4px; + background-color: #FF0000; +} + +/* All views: header legend value for legend entry */ +td.headerValueLeg +{ + text-align: left; + color: #000000; + font-family: sans-serif; + font-size: 80%; + white-space: nowrap; + padding-top: 4px; +} + +/* All views: color of horizontal ruler */ +td.ruler +{ + background-color: #6688D4; +} + +/* All views: version string format */ +td.versionInfo +{ + text-align: center; + padding-top: 2px; + font-family: sans-serif; + font-style: italic; +} + +/* Directory view/File view (all)/Test case descriptions: + table headline format */ +td.tableHead +{ + text-align: center; + color: #FFFFFF; + background-color: #6688D4; + font-family: sans-serif; + font-size: 120%; + font-weight: bold; + white-space: nowrap; + padding-left: 4px; + padding-right: 4px; +} + +span.tableHeadSort +{ + padding-right: 4px; +} + +/* Directory view/File view (all): filename entry format */ +td.coverFile +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284FA8; + background-color: #DAE7FE; + font-family: monospace; +} + +/* Directory view/File view (all): bar-graph entry format*/ +td.coverBar +{ + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; +} + +/* Directory view/File view (all): bar-graph outline color */ +td.coverBarOutline +{ + background-color: #000000; +} + +/* Directory view/File view (all): percentage entry for files with + high coverage rate */ +td.coverPerHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #A7FC9D; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + high coverage rate */ +td.coverNumHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #A7FC9D; + white-space: nowrap; + font-family: sans-serif; +} + +/* Directory view/File view (all): percentage entry for files with + medium coverage rate */ +td.coverPerMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FFEA20; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + medium coverage rate */ +td.coverNumMed +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FFEA20; + white-space: nowrap; + font-family: sans-serif; +} + +/* Directory view/File view (all): percentage entry for files with + low coverage rate */ +td.coverPerLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + font-weight: bold; + font-family: sans-serif; +} + +/* Directory view/File view (all): line count entry for files with + low coverage rate */ +td.coverNumLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + white-space: nowrap; + font-family: sans-serif; +} + +/* File view (all): "show/hide details" link format */ +a.detail:link +{ + color: #B8D0FF; + font-size:80%; +} + +/* File view (all): "show/hide details" link - visited format */ +a.detail:visited +{ + color: #B8D0FF; + font-size:80%; +} + +/* File view (all): "show/hide details" link - activated format */ +a.detail:active +{ + color: #FFFFFF; + font-size:80%; +} + +/* File view (detail): test name entry */ +td.testName +{ + text-align: right; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* File view (detail): test percentage entry */ +td.testPer +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* File view (detail): test lines count entry */ +td.testNum +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-family: sans-serif; +} + +/* Test case descriptions: test name format*/ +dt +{ + font-family: sans-serif; + font-weight: bold; +} + +/* Test case descriptions: description table body */ +td.testDescription +{ + padding-top: 10px; + padding-left: 30px; + padding-bottom: 10px; + padding-right: 30px; + background-color: #DAE7FE; +} + +/* Source code view: function entry */ +td.coverFn +{ + text-align: left; + padding-left: 10px; + padding-right: 20px; + color: #284FA8; + background-color: #DAE7FE; + font-family: monospace; +} + +/* Source code view: function entry zero count*/ +td.coverFnLo +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #FF0000; + font-weight: bold; + font-family: sans-serif; +} + +/* Source code view: function entry nonzero count*/ +td.coverFnHi +{ + text-align: right; + padding-left: 10px; + padding-right: 10px; + background-color: #DAE7FE; + font-weight: bold; + font-family: sans-serif; +} + +/* Source code view: source code format */ +pre.source +{ + font-family: monospace; + white-space: pre; + margin-top: 2px; +} + +/* Source code view: line number format */ +span.lineNum +{ + background-color: #EFE383; +} + +/* Source code view: format for lines which were executed */ +td.lineCov, +span.lineCov +{ + background-color: #CAD7FE; +} + +/* Source code view: format for Cov legend */ +span.coverLegendCov +{ + padding-left: 10px; + padding-right: 10px; + padding-bottom: 2px; + background-color: #CAD7FE; +} + +/* Source code view: format for lines which were not executed */ +td.lineNoCov, +span.lineNoCov +{ + background-color: #FF6230; +} + +/* Source code view: format for NoCov legend */ +span.coverLegendNoCov +{ + padding-left: 10px; + padding-right: 10px; + padding-bottom: 2px; + background-color: #FF6230; +} + +/* Source code view (function table): standard link - visited format */ +td.lineNoCov > a:visited, +td.lineCov > a:visited +{ + color: black; + text-decoration: underline; +} + +/* Source code view: format for lines which were executed only in a + previous version */ +span.lineDiffCov +{ + background-color: #B5F7AF; +} + +/* Source code view: format for branches which were executed + * and taken */ +span.branchCov +{ + background-color: #CAD7FE; +} + +/* Source code view: format for branches which were executed + * but not taken */ +span.branchNoCov +{ + background-color: #FF6230; +} + +/* Source code view: format for branches which were not executed */ +span.branchNoExec +{ + background-color: #FF6230; +} + +/* Source code view: format for the source code heading line */ +pre.sourceHeading +{ + white-space: pre; + font-family: monospace; + font-weight: bold; + margin: 0px; +} + +/* All views: header legend value for low rate */ +td.headerValueLegL +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 4px; + padding-right: 2px; + background-color: #FF0000; + font-size: 80%; +} + +/* All views: header legend value for med rate */ +td.headerValueLegM +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 2px; + padding-right: 2px; + background-color: #FFEA20; + font-size: 80%; +} + +/* All views: header legend value for hi rate */ +td.headerValueLegH +{ + font-family: sans-serif; + text-align: center; + white-space: nowrap; + padding-left: 2px; + padding-right: 4px; + background-color: #A7FC9D; + font-size: 80%; +} + +/* All views except source code view: legend format for low coverage */ +span.coverLegendCovLo +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #FF0000; +} + +/* All views except source code view: legend format for med coverage */ +span.coverLegendCovMed +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #FFEA20; +} + +/* All views except source code view: legend format for hi coverage */ +span.coverLegendCovHi +{ + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + background-color: #A7FC9D; +} diff --git a/packages/camera/camera_platform_interface/coverage/html/glass.png b/packages/camera/camera_platform_interface/coverage/html/glass.png new file mode 100644 index 0000000000000000000000000000000000000000..e1abc00680a3093c49fdb775ae6bdb6764c95af2 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)gaEa{HEjtmSN`?>!lvI6;R0X`wF z|Ns97GD8ntt^-nxB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gf+eGhVt|_XjA* zUgGKN%6^Gmn4d%Ph(nkFP>9RZ#WAE}PI3Z}&BVayv3^M*kj3EX>gTe~DWM4f=_Dpv literal 0 HcmV?d00001 diff --git a/packages/camera/camera_platform_interface/coverage/html/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/index-sort-f.html new file mode 100644 index 000000000000..64c6d7a42230 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/index-sort-f.html @@ -0,0 +1,133 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:25926996.3 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils +
100.0%
+
100.0 %5 / 5-0 / 0
types +
94.7%94.7%
+
94.7 %36 / 38-0 / 0
method_channel +
94.7%94.7%
+
94.7 %108 / 114-0 / 0
platform_interface +
95.5%95.5%
+
95.5 %42 / 44-0 / 0
events +
100.0%
+
100.0 %68 / 68-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/index-sort-l.html new file mode 100644 index 000000000000..cc0e305d2832 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/index-sort-l.html @@ -0,0 +1,133 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:25926996.3 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
types +
94.7%94.7%
+
94.7 %36 / 38-0 / 0
method_channel +
94.7%94.7%
+
94.7 %108 / 114-0 / 0
platform_interface +
95.5%95.5%
+
95.5 %42 / 44-0 / 0
utils +
100.0%
+
100.0 %5 / 5-0 / 0
events +
100.0%
+
100.0 %68 / 68-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/index.html b/packages/camera/camera_platform_interface/coverage/html/index.html new file mode 100644 index 000000000000..b4cb4e816b3a --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/index.html @@ -0,0 +1,133 @@ + + + + + + + LCOV - lcov.info + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:25926996.3 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
events +
100.0%
+
100.0 %68 / 68-0 / 0
method_channel +
94.7%94.7%
+
94.7 %108 / 114-0 / 0
platform_interface +
95.5%95.5%
+
95.5 %42 / 44-0 / 0
types +
94.7%94.7%
+
94.7 %36 / 38-0 / 0
utils +
100.0%
+
100.0 %5 / 5-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-f.html new file mode 100644 index 000000000000..a515bba57ad1 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-f.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - method_channel + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - method_channelHitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
method_channel_camera.dart +
94.7%94.7%
+
94.7 %108 / 114-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-l.html new file mode 100644 index 000000000000..8991e20f97fa --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-l.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - method_channel + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - method_channelHitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
method_channel_camera.dart +
94.7%94.7%
+
94.7 %108 / 114-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/index.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/index.html new file mode 100644 index 000000000000..7ab55baa6a6c --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/method_channel/index.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - method_channel + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - method_channelHitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
method_channel_camera.dart +
94.7%94.7%
+
94.7 %108 / 114-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func-sort-c.html new file mode 100644 index 000000000000..b05a267856fd --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - method_channel/method_channel_camera.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - method_channel - method_channel_camera.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func.html new file mode 100644 index 000000000000..05e9a436d9ce --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - method_channel/method_channel_camera.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - method_channel - method_channel_camera.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.gcov.html new file mode 100644 index 000000000000..28f1f07b9acf --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.gcov.html @@ -0,0 +1,370 @@ + + + + + + + LCOV - lcov.info - method_channel/method_channel_camera.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - method_channel - method_channel_camera.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : import 'dart:async';
+       6             : 
+       7             : import 'package:camera_platform_interface/camera_platform_interface.dart';
+       8             : import 'package:camera_platform_interface/src/types/image_format_group.dart';
+       9             : import 'package:camera_platform_interface/src/utils/utils.dart';
+      10             : import 'package:cross_file/cross_file.dart';
+      11             : import 'package:flutter/services.dart';
+      12             : import 'package:flutter/widgets.dart';
+      13             : import 'package:meta/meta.dart';
+      14             : import 'package:stream_transform/stream_transform.dart';
+      15             : 
+      16             : const MethodChannel _channel = MethodChannel('plugins.flutter.io/camera');
+      17             : 
+      18             : /// An implementation of [CameraPlatform] that uses method channels.
+      19             : class MethodChannelCamera extends CameraPlatform {
+      20             :   final Map<int, MethodChannel> _channels = {};
+      21             : 
+      22             :   /// The controller we need to broadcast the different events coming
+      23             :   /// from handleMethodCall.
+      24             :   ///
+      25             :   /// It is a `broadcast` because multiple controllers will connect to
+      26             :   /// different stream views of this Controller.
+      27             :   /// This is only exposed for test purposes. It shouldn't be used by clients of
+      28             :   /// the plugin as it may break or change at any time.
+      29             :   @visibleForTesting
+      30             :   final StreamController<CameraEvent> cameraEventStreamController =
+      31             :       StreamController<CameraEvent>.broadcast();
+      32             : 
+      33           1 :   Stream<CameraEvent> _events(int cameraId) =>
+      34           2 :       cameraEventStreamController.stream
+      35           4 :           .where((event) => event.cameraId == cameraId);
+      36             : 
+      37             :   @override
+      38           1 :   Future<List<CameraDescription>> availableCameras() async {
+      39             :     try {
+      40           1 :       final List<Map<dynamic, dynamic>> cameras = await _channel
+      41           1 :           .invokeListMethod<Map<dynamic, dynamic>>('availableCameras');
+      42           2 :       return cameras.map((Map<dynamic, dynamic> camera) {
+      43           1 :         return CameraDescription(
+      44           1 :           name: camera['name'],
+      45           2 :           lensDirection: parseCameraLensDirection(camera['lensFacing']),
+      46           1 :           sensorOrientation: camera['sensorOrientation'],
+      47             :         );
+      48           1 :       }).toList();
+      49           1 :     } on PlatformException catch (e) {
+      50           3 :       throw CameraException(e.code, e.message);
+      51             :     }
+      52             :   }
+      53             : 
+      54             :   @override
+      55           1 :   Future<int> createCamera(
+      56             :     CameraDescription cameraDescription,
+      57             :     ResolutionPreset resolutionPreset, {
+      58             :     bool enableAudio,
+      59             :   }) async {
+      60             :     try {
+      61             :       final Map<String, dynamic> reply =
+      62           2 :           await _channel.invokeMapMethod<String, dynamic>(
+      63             :         'create',
+      64           1 :         <String, dynamic>{
+      65           1 :           'cameraName': cameraDescription.name,
+      66             :           'resolutionPreset': resolutionPreset != null
+      67           1 :               ? _serializeResolutionPreset(resolutionPreset)
+      68             :               : null,
+      69             :           'enableAudio': enableAudio,
+      70             :         },
+      71             :       );
+      72           1 :       return reply['cameraId'];
+      73           1 :     } on PlatformException catch (e) {
+      74           3 :       throw CameraException(e.code, e.message);
+      75             :     }
+      76             :   }
+      77             : 
+      78           1 :   @override
+      79             :   Future<void> initializeCamera(int cameraId, {ImageFormatGroup imageFormatGroup}) {
+      80           3 :     _channels.putIfAbsent(cameraId, () {
+      81           2 :       final channel = MethodChannel('flutter.io/cameraPlugin/camera$cameraId');
+      82           1 :       channel.setMethodCallHandler(
+      83           0 :           (MethodCall call) => handleMethodCall(call, cameraId));
+      84             :       return channel;
+      85             :     });
+      86             : 
+      87           1 :     Completer _completer = Completer();
+      88             : 
+      89           4 :     onCameraInitialized(cameraId).first.then((value) {
+      90           1 :       _completer.complete();
+      91             :     });
+      92             : 
+      93           1 :     _channel.invokeMapMethod<String, dynamic>(
+      94             :       'initialize',
+      95           1 :       <String, dynamic>{
+      96             :         'cameraId': cameraId,
+      97           1 :         'imageFormatGroup': imageFormatGroup.name(),
+      98             :       },
+      99             :     );
+     100             : 
+     101           1 :     return _completer.future;
+     102             :   }
+     103             : 
+     104             :   @override
+     105           1 :   Future<void> dispose(int cameraId) async {
+     106           2 :     await _channel.invokeMethod<void>(
+     107             :       'dispose',
+     108           1 :       <String, dynamic>{'cameraId': cameraId},
+     109             :     );
+     110             : 
+     111           2 :     if (_channels.containsKey(cameraId)) {
+     112           3 :       _channels[cameraId].setMethodCallHandler(null);
+     113           2 :       _channels.remove(cameraId);
+     114             :     }
+     115             :   }
+     116             : 
+     117           1 :   @override
+     118             :   Stream<CameraInitializedEvent> onCameraInitialized(int cameraId) {
+     119           2 :     return _events(cameraId).whereType<CameraInitializedEvent>();
+     120             :   }
+     121             : 
+     122           1 :   @override
+     123             :   Stream<CameraResolutionChangedEvent> onCameraResolutionChanged(int cameraId) {
+     124           2 :     return _events(cameraId).whereType<CameraResolutionChangedEvent>();
+     125             :   }
+     126             : 
+     127           1 :   @override
+     128             :   Stream<CameraClosingEvent> onCameraClosing(int cameraId) {
+     129           2 :     return _events(cameraId).whereType<CameraClosingEvent>();
+     130             :   }
+     131             : 
+     132           1 :   @override
+     133             :   Stream<CameraErrorEvent> onCameraError(int cameraId) {
+     134           2 :     return _events(cameraId).whereType<CameraErrorEvent>();
+     135             :   }
+     136             : 
+     137             :   @override
+     138           1 :   Future<XFile> takePicture(int cameraId) async {
+     139           2 :     String path = await _channel.invokeMethod<String>(
+     140             :       'takePicture',
+     141           1 :       <String, dynamic>{'cameraId': cameraId},
+     142             :     );
+     143           1 :     return XFile(path);
+     144             :   }
+     145             : 
+     146           1 :   @override
+     147             :   Future<void> prepareForVideoRecording() =>
+     148           1 :       _channel.invokeMethod<void>('prepareForVideoRecording');
+     149             : 
+     150             :   @override
+     151           1 :   Future<void> startVideoRecording(int cameraId) async {
+     152           2 :     await _channel.invokeMethod<void>(
+     153             :       'startVideoRecording',
+     154           1 :       <String, dynamic>{'cameraId': cameraId},
+     155             :     );
+     156             :   }
+     157             : 
+     158             :   @override
+     159           1 :   Future<XFile> stopVideoRecording(int cameraId) async {
+     160           2 :     String path = await _channel.invokeMethod<String>(
+     161             :       'stopVideoRecording',
+     162           1 :       <String, dynamic>{'cameraId': cameraId},
+     163             :     );
+     164           1 :     return XFile(path);
+     165             :   }
+     166             : 
+     167           1 :   @override
+     168           1 :   Future<void> pauseVideoRecording(int cameraId) => _channel.invokeMethod<void>(
+     169             :         'pauseVideoRecording',
+     170           1 :         <String, dynamic>{'cameraId': cameraId},
+     171             :       );
+     172             : 
+     173           1 :   @override
+     174             :   Future<void> resumeVideoRecording(int cameraId) =>
+     175           1 :       _channel.invokeMethod<void>(
+     176             :         'resumeVideoRecording',
+     177           1 :         <String, dynamic>{'cameraId': cameraId},
+     178             :       );
+     179             : 
+     180           1 :   @override
+     181             :   Future<void> setFlashMode(int cameraId, FlashMode mode) =>
+     182           1 :       _channel.invokeMethod<void>(
+     183             :         'setFlashMode',
+     184           1 :         <String, dynamic>{
+     185             :           'cameraId': cameraId,
+     186           1 :           'mode': _serializeFlashMode(mode),
+     187             :         },
+     188             :       );
+     189             : 
+     190           1 :   @override
+     191           1 :   Future<double> getMaxZoomLevel(int cameraId) => _channel.invokeMethod<double>(
+     192             :         'getMaxZoomLevel',
+     193           1 :         <String, dynamic>{'cameraId': cameraId},
+     194             :       );
+     195             : 
+     196           1 :   @override
+     197           1 :   Future<double> getMinZoomLevel(int cameraId) => _channel.invokeMethod<double>(
+     198             :         'getMinZoomLevel',
+     199           1 :         <String, dynamic>{'cameraId': cameraId},
+     200             :       );
+     201             : 
+     202             :   @override
+     203           1 :   Future<void> setZoomLevel(int cameraId, double zoom) async {
+     204             :     try {
+     205           2 :       await _channel.invokeMethod<double>(
+     206             :         'setZoomLevel',
+     207           1 :         <String, dynamic>{
+     208             :           'cameraId': cameraId,
+     209             :           'zoom': zoom,
+     210             :         },
+     211             :       );
+     212           1 :     } on PlatformException catch (e) {
+     213           3 :       throw CameraException(e.code, e.message);
+     214             :     }
+     215             :   }
+     216             : 
+     217           1 :   @override
+     218             :   Widget buildPreview(int cameraId) {
+     219           1 :     return Texture(textureId: cameraId);
+     220             :   }
+     221             : 
+     222             :   /// Returns the flash mode as a String.
+     223           1 :   String _serializeFlashMode(FlashMode flashMode) {
+     224             :     switch (flashMode) {
+     225           1 :       case FlashMode.off:
+     226             :         return 'off';
+     227           1 :       case FlashMode.auto:
+     228             :         return 'auto';
+     229           1 :       case FlashMode.always:
+     230             :         return 'always';
+     231           0 :       case FlashMode.torch:
+     232             :         return 'torch';
+     233             :       default:
+     234           0 :         throw ArgumentError('Unknown FlashMode value');
+     235             :     }
+     236             :   }
+     237             : 
+     238             :   /// Returns the resolution preset as a String.
+     239           1 :   String _serializeResolutionPreset(ResolutionPreset resolutionPreset) {
+     240             :     switch (resolutionPreset) {
+     241           1 :       case ResolutionPreset.max:
+     242             :         return 'max';
+     243           1 :       case ResolutionPreset.ultraHigh:
+     244             :         return 'ultraHigh';
+     245           1 :       case ResolutionPreset.veryHigh:
+     246             :         return 'veryHigh';
+     247           1 :       case ResolutionPreset.high:
+     248             :         return 'high';
+     249           0 :       case ResolutionPreset.medium:
+     250             :         return 'medium';
+     251           0 :       case ResolutionPreset.low:
+     252             :         return 'low';
+     253             :       default:
+     254           0 :         throw ArgumentError('Unknown ResolutionPreset value');
+     255             :     }
+     256             :   }
+     257             : 
+     258             :   /// Converts messages received from the native platform into events.
+     259             :   ///
+     260             :   /// This is only exposed for test purposes. It shouldn't be used by clients of
+     261             :   /// the plugin as it may break or change at any time.
+     262             :   @visibleForTesting
+     263           1 :   Future<dynamic> handleMethodCall(MethodCall call, int cameraId) async {
+     264           1 :     switch (call.method) {
+     265           1 :       case 'initialized':
+     266           3 :         cameraEventStreamController.add(CameraInitializedEvent(
+     267             :           cameraId,
+     268           2 :           call.arguments['previewWidth'],
+     269           2 :           call.arguments['previewHeight'],
+     270             :         ));
+     271             :         break;
+     272           1 :       case 'resolution_changed':
+     273           3 :         cameraEventStreamController.add(CameraResolutionChangedEvent(
+     274             :           cameraId,
+     275           2 :           call.arguments['captureWidth'],
+     276           2 :           call.arguments['captureHeight'],
+     277             :         ));
+     278             :         break;
+     279           1 :       case 'camera_closing':
+     280           3 :         cameraEventStreamController.add(CameraClosingEvent(
+     281             :           cameraId,
+     282             :         ));
+     283             :         break;
+     284           1 :       case 'error':
+     285           3 :         cameraEventStreamController.add(CameraErrorEvent(
+     286             :           cameraId,
+     287           2 :           call.arguments['description'],
+     288             :         ));
+     289             :         break;
+     290             :       default:
+     291           1 :         throw MissingPluginException();
+     292             :     }
+     293             :   }
+     294             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func-sort-c.html new file mode 100644 index 000000000000..0418f4f78823 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - platform_interface/camera_platform.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - platform_interface - camera_platform.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func.html new file mode 100644 index 000000000000..08900de0c15a --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - platform_interface/camera_platform.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - platform_interface - camera_platform.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.gcov.html new file mode 100644 index 000000000000..61985292e523 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.gcov.html @@ -0,0 +1,225 @@ + + + + + + + LCOV - lcov.info - platform_interface/camera_platform.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - platform_interface - camera_platform.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : import 'dart:async';
+       6             : 
+       7             : import 'package:camera_platform_interface/camera_platform_interface.dart';
+       8             : import 'package:camera_platform_interface/src/method_channel/method_channel_camera.dart';
+       9             : import 'package:camera_platform_interface/src/types/image_format_group.dart';
+      10             : import 'package:cross_file/cross_file.dart';
+      11             : import 'package:flutter/widgets.dart';
+      12             : import 'package:plugin_platform_interface/plugin_platform_interface.dart';
+      13             : 
+      14             : /// The interface that implementations of camera must implement.
+      15             : ///
+      16             : /// Platform implementations should extend this class rather than implement it as `camera`
+      17             : /// does not consider newly added methods to be breaking changes. Extending this class
+      18             : /// (using `extends`) ensures that the subclass will get the default implementation, while
+      19             : /// platform implementations that `implements` this interface will be broken by newly added
+      20             : /// [CameraPlatform] methods.
+      21             : abstract class CameraPlatform extends PlatformInterface {
+      22             :   /// Constructs a CameraPlatform.
+      23           6 :   CameraPlatform() : super(token: _token);
+      24             : 
+      25           6 :   static final Object _token = Object();
+      26             : 
+      27           3 :   static CameraPlatform _instance = MethodChannelCamera();
+      28             : 
+      29             :   /// The default instance of [CameraPlatform] to use.
+      30             :   ///
+      31             :   /// Defaults to [MethodChannelCamera].
+      32           2 :   static CameraPlatform get instance => _instance;
+      33             : 
+      34             :   /// Platform-specific plugins should set this with their own platform-specific
+      35             :   /// class that extends [CameraPlatform] when they register themselves.
+      36           1 :   static set instance(CameraPlatform instance) {
+      37           2 :     PlatformInterface.verifyToken(instance, _token);
+      38             :     _instance = instance;
+      39             :   }
+      40             : 
+      41             :   /// Completes with a list of available cameras.
+      42           1 :   Future<List<CameraDescription>> availableCameras() {
+      43           1 :     throw UnimplementedError('availableCameras() is not implemented.');
+      44             :   }
+      45             : 
+      46             :   /// Creates an uninitialized camera instance and returns the cameraId.
+      47           1 :   Future<int> createCamera(
+      48             :     CameraDescription cameraDescription,
+      49             :     ResolutionPreset resolutionPreset, {
+      50             :     bool enableAudio,
+      51             :   }) {
+      52           1 :     throw UnimplementedError('createCamera() is not implemented.');
+      53             :   }
+      54             : 
+      55             :   /// Initializes the camera on the device.
+      56             :   ///
+      57             :   /// [imageFormatGroup] is used to specify the image formatting used.
+      58             :   /// On Android this defaults to ImageFormat.YUV_420_888 and applies only to the imageStream.
+      59             :   /// On iOS this defaults to kCVPixelFormatType_32BGRA.
+      60           1 :   Future<void> initializeCamera(int cameraId, {ImageFormatGroup imageFormatGroup}) {
+      61           1 :     throw UnimplementedError('initializeCamera() is not implemented.');
+      62             :   }
+      63             : 
+      64             :   /// The camera has been initialized
+      65           1 :   Stream<CameraInitializedEvent> onCameraInitialized(int cameraId) {
+      66           1 :     throw UnimplementedError('onCameraInitialized() is not implemented.');
+      67             :   }
+      68             : 
+      69             :   /// The camera's resolution has changed
+      70           1 :   Stream<CameraResolutionChangedEvent> onCameraResolutionChanged(int cameraId) {
+      71           1 :     throw UnimplementedError('onResolutionChanged() is not implemented.');
+      72             :   }
+      73             : 
+      74             :   /// The camera started to close.
+      75           1 :   Stream<CameraClosingEvent> onCameraClosing(int cameraId) {
+      76           1 :     throw UnimplementedError('onCameraClosing() is not implemented.');
+      77             :   }
+      78             : 
+      79             :   /// The camera experienced an error.
+      80           1 :   Stream<CameraErrorEvent> onCameraError(int cameraId) {
+      81           1 :     throw UnimplementedError('onCameraError() is not implemented.');
+      82             :   }
+      83             : 
+      84             :   /// Captures an image and returns the file where it was saved.
+      85           1 :   Future<XFile> takePicture(int cameraId) {
+      86           1 :     throw UnimplementedError('takePicture() is not implemented.');
+      87             :   }
+      88             : 
+      89             :   /// Prepare the capture session for video recording.
+      90           1 :   Future<void> prepareForVideoRecording() {
+      91           1 :     throw UnimplementedError('prepareForVideoRecording() is not implemented.');
+      92             :   }
+      93             : 
+      94             :   /// Starts a video recording.
+      95             :   ///
+      96             :   /// The video is returned as a [XFile] after calling [stopVideoRecording].
+      97           1 :   Future<void> startVideoRecording(int cameraId) {
+      98           1 :     throw UnimplementedError('startVideoRecording() is not implemented.');
+      99             :   }
+     100             : 
+     101             :   /// Stops the video recording and returns the file where it was saved.
+     102           1 :   Future<XFile> stopVideoRecording(int cameraId) {
+     103           1 :     throw UnimplementedError('stopVideoRecording() is not implemented.');
+     104             :   }
+     105             : 
+     106             :   /// Pause video recording.
+     107           1 :   Future<void> pauseVideoRecording(int cameraId) {
+     108           1 :     throw UnimplementedError('pauseVideoRecording() is not implemented.');
+     109             :   }
+     110             : 
+     111             :   /// Resume video recording after pausing.
+     112           1 :   Future<void> resumeVideoRecording(int cameraId) {
+     113           1 :     throw UnimplementedError('resumeVideoRecording() is not implemented.');
+     114             :   }
+     115             : 
+     116             :   /// Sets the flash mode for the selected camera.
+     117           1 :   Future<void> setFlashMode(int cameraId, FlashMode mode) {
+     118           1 :     throw UnimplementedError('setFlashMode() is not implemented.');
+     119             :   }
+     120             : 
+     121             :   /// Gets the maximum supported zoom level for the selected camera.
+     122           1 :   Future<double> getMaxZoomLevel(int cameraId) {
+     123           1 :     throw UnimplementedError('getMaxZoomLevel() is not implemented.');
+     124             :   }
+     125             : 
+     126             :   /// Gets the minimum supported zoom level for the selected camera.
+     127           1 :   Future<double> getMinZoomLevel(int cameraId) {
+     128           1 :     throw UnimplementedError('getMinZoomLevel() is not implemented.');
+     129             :   }
+     130             : 
+     131             :   /// Set the zoom level for the selected camera.
+     132             :   ///
+     133             :   /// The supplied [zoom] value should be between 1.0 and the maximum supported
+     134             :   /// zoom level returned by the `getMaxZoomLevel`. Throws an `CameraException`
+     135             :   /// when an illegal zoom level is supplied.
+     136           1 :   Future<void> setZoomLevel(int cameraId, double zoom) {
+     137           1 :     throw UnimplementedError('setZoomLevel() is not implemented.');
+     138             :   }
+     139             : 
+     140             :   /// Returns a widget showing a live camera preview.
+     141           0 :   Widget buildPreview(int cameraId) {
+     142           0 :     throw UnimplementedError('buildView() has not been implemented.');
+     143             :   }
+     144             : 
+     145             :   /// Releases the resources of this camera.
+     146           1 :   Future<void> dispose(int cameraId) {
+     147           1 :     throw UnimplementedError('dispose() is not implemented.');
+     148             :   }
+     149             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-f.html new file mode 100644 index 000000000000..ed133c8e7439 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-f.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - platform_interface + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - platform_interfaceHitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_platform.dart +
95.5%95.5%
+
95.5 %42 / 44-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-l.html new file mode 100644 index 000000000000..a38f4c0fb8b5 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-l.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - platform_interface + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - platform_interfaceHitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_platform.dart +
95.5%95.5%
+
95.5 %42 / 44-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index.html new file mode 100644 index 000000000000..82c80ddfd89d --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - platform_interface + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - platform_interfaceHitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_platform.dart +
95.5%95.5%
+
95.5 %42 / 44-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/ruby.png b/packages/camera/camera_platform_interface/coverage/html/ruby.png new file mode 100644 index 0000000000000000000000000000000000000000..991b6d4ec9e78be165e3ef757eed1aada287364d GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^FceV#7`HfI^%F z9+AZi4BSE>%y{W;-5;PJOS+@4BLl<6e(pbstUx|nfKQ0)e^Y%R^MdiLxj>4`)5S5Q b;#P73kj=!v_*DHKNFRfztDnm{r-UW|iOwIS literal 0 HcmV?d00001 diff --git a/packages/camera/camera_platform_interface/coverage/html/snow.png b/packages/camera/camera_platform_interface/coverage/html/snow.png new file mode 100644 index 0000000000000000000000000000000000000000..2cdae107fceec6e7f02ac7acb4a34a82a540caa5 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^MM!lvI6;R0X`wF|Ns97GD8ntt^-nBo-U3d c6}OTTfNUlP#;5A{K>8RwUHx3vIVCg!071?oo&W#< literal 0 HcmV?d00001 diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func-sort-c.html new file mode 100644 index 000000000000..9a25fd2bc0eb --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/camera_description.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - camera_description.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:121485.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func.html new file mode 100644 index 000000000000..291bacbbf826 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/camera_description.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - camera_description.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:121485.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.gcov.html new file mode 100644 index 000000000000..0c0fe89ac6a5 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.gcov.html @@ -0,0 +1,128 @@ + + + + + + + LCOV - lcov.info - types/camera_description.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - camera_description.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:121485.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : /// The direction the camera is facing.
+       6           9 : enum CameraLensDirection {
+       7             :   /// Front facing camera (a user looking at the screen is seen by the camera).
+       8           9 :   front,
+       9             : 
+      10             :   /// Back facing camera (a user looking at the screen is not seen by the camera).
+      11           9 :   back,
+      12             : 
+      13             :   /// External camera which may not be mounted to the device.
+      14           9 :   external,
+      15             : }
+      16             : 
+      17             : /// Properties of a camera device.
+      18             : class CameraDescription {
+      19             :   /// Creates a new camera description with the given properties.
+      20           2 :   CameraDescription({this.name, this.lensDirection, this.sensorOrientation});
+      21             : 
+      22             :   /// The name of the camera device.
+      23             :   final String name;
+      24             : 
+      25             :   /// The direction the camera is facing.
+      26             :   final CameraLensDirection lensDirection;
+      27             : 
+      28             :   /// Clockwise angle through which the output image needs to be rotated to be upright on the device screen in its native orientation.
+      29             :   ///
+      30             :   /// **Range of valid values:**
+      31             :   /// 0, 90, 180, 270
+      32             :   ///
+      33             :   /// On Android, also defines the direction of rolling shutter readout, which
+      34             :   /// is from top to bottom in the sensor's coordinate system.
+      35             :   final int sensorOrientation;
+      36             : 
+      37           2 :   @override
+      38             :   bool operator ==(Object other) =>
+      39             :       identical(this, other) ||
+      40           2 :       other is CameraDescription &&
+      41           6 :           runtimeType == other.runtimeType &&
+      42           6 :           name == other.name &&
+      43           6 :           lensDirection == other.lensDirection;
+      44             : 
+      45           1 :   @override
+      46           5 :   int get hashCode => name.hashCode ^ lensDirection.hashCode;
+      47             : 
+      48           0 :   @override
+      49             :   String toString() {
+      50           0 :     return '$runtimeType($name, $lensDirection, $sensorOrientation)';
+      51             :   }
+      52             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func-sort-c.html new file mode 100644 index 000000000000..d7934f4afbb6 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/camera_exception.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - camera_exception.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:33100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func.html new file mode 100644 index 000000000000..f51a62224a79 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/camera_exception.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - camera_exception.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:33100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.gcov.html new file mode 100644 index 000000000000..bbb37aeb1548 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.gcov.html @@ -0,0 +1,96 @@ + + + + + + + LCOV - lcov.info - types/camera_exception.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - camera_exception.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:33100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : /// This is thrown when the plugin reports an error.
+       6             : class CameraException implements Exception {
+       7             :   /// Creates a new camera exception with the given error code and description.
+       8           2 :   CameraException(this.code, this.description);
+       9             : 
+      10             :   /// Error code.
+      11             :   // TODO(bparrishMines): Document possible error codes.
+      12             :   // https://github.com/flutter/flutter/issues/69298
+      13             :   String code;
+      14             : 
+      15             :   /// Textual description of the error.
+      16             :   String description;
+      17             : 
+      18           1 :   @override
+      19           3 :   String toString() => 'CameraException($code, $description)';
+      20             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func-sort-c.html new file mode 100644 index 000000000000..aa1eb1b767a4 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/flash_mode.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - flash_mode.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func.html new file mode 100644 index 000000000000..9536d183eb77 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/flash_mode.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - flash_mode.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.gcov.html new file mode 100644 index 000000000000..258cc1dc1154 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.gcov.html @@ -0,0 +1,94 @@ + + + + + + + LCOV - lcov.info - types/flash_mode.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - flash_mode.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2019 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : /// The possible flash modes that can be set for a camera
+       6           9 : enum FlashMode {
+       7             :   /// Do not use the flash when taking a picture.
+       8           9 :   off,
+       9             : 
+      10             :   /// Let the device decide whether to flash the camera when taking a picture.
+      11           9 :   auto,
+      12             : 
+      13             :   /// Always use the flash when taking a picture.
+      14           9 :   always,
+      15             : 
+      16             :   /// Turns on the flash light and keeps it on until switched off.
+      17           9 :   torch,
+      18             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func-sort-c.html new file mode 100644 index 000000000000..160a2977ee4e --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/image_format_group.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - image_format_group.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func.html new file mode 100644 index 000000000000..3874d891e3dd --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/image_format_group.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - image_format_group.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.gcov.html new file mode 100644 index 000000000000..3b8b8e7da196 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.gcov.html @@ -0,0 +1,126 @@ + + + + + + + LCOV - lcov.info - types/image_format_group.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - image_format_group.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : /// Group of image formats that are comparable across Android and iOS platforms.
+       2           9 : enum ImageFormatGroup {
+       3             :   /// The image format does not fit into any specific group.
+       4           9 :   unknown,
+       5             : 
+       6             :   /// Multi-plane YUV 420 format.
+       7             :   ///
+       8             :   /// This format is a generic YCbCr format, capable of describing any 4:2:0
+       9             :   /// chroma-subsampled planar or semiplanar buffer (but not fully interleaved),
+      10             :   /// with 8 bits per color sample.
+      11             :   ///
+      12             :   /// On Android, this is `android.graphics.ImageFormat.YUV_420_888`. See
+      13             :   /// https://developer.android.com/reference/android/graphics/ImageFormat.html#YUV_420_888
+      14             :   ///
+      15             :   /// On iOS, this is `kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange`. See
+      16             :   /// https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_420ypcbcr8biplanarvideorange?language=objc
+      17           9 :   yuv420,
+      18             : 
+      19             :   /// 32-bit BGRA.
+      20             :   ///
+      21             :   /// On iOS, this is `kCVPixelFormatType_32BGRA`. See
+      22             :   /// https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_32bgra?language=objc
+      23           9 :   bgra8888,
+      24             : 
+      25             :   /// 32-big RGB image encoded into JPEG bytes.
+      26             :   ///
+      27             :   /// On Android, this is `android.graphics.ImageFormat.JPEG`. See
+      28             :   /// https://developer.android.com/reference/android/graphics/ImageFormat#JPEG
+      29           9 :   jpeg,
+      30             : }
+      31             : 
+      32             : /// Extension on [ImageFormatGroup] to stringify the enum
+      33             : extension ImageFormatGroupName on ImageFormatGroup {
+      34             :   /// returns a String value for [ImageFormatGroup]
+      35             :   /// returns 'unknown' if platform is not supported
+      36             :   /// or if [ImageFormatGroup] is not supported for the platform
+      37           2 :   String name() {
+      38             :     switch (this) {
+      39           2 :       case ImageFormatGroup.bgra8888:
+      40             :         return 'bgra8888';
+      41           2 :       case ImageFormatGroup.yuv420:
+      42             :         return 'yuv420';
+      43           2 :       case ImageFormatGroup.jpeg:
+      44             :         return 'jpeg';
+      45             :       case ImageFormatGroup.unknown:
+      46             :       default:
+      47             :         return 'unknown';
+      48             :     }
+      49             :   }
+      50             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/types/index-sort-f.html new file mode 100644 index 000000000000..aef40f7ff5f3 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/index-sort-f.html @@ -0,0 +1,133 @@ + + + + + + + LCOV - lcov.info - types + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - typesHitTotalCoverage
Test:lcov.infoLines:363894.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
image_format_group.dart +
100.0%
+
100.0 %9 / 9-0 / 0
camera_description.dart +
85.7%85.7%
+
85.7 %12 / 14-0 / 0
flash_mode.dart +
100.0%
+
100.0 %5 / 5-0 / 0
camera_exception.dart +
100.0%
+
100.0 %3 / 3-0 / 0
resolution_preset.dart +
100.0%
+
100.0 %7 / 7-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/types/index-sort-l.html new file mode 100644 index 000000000000..0b5ae6e65dab --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/index-sort-l.html @@ -0,0 +1,133 @@ + + + + + + + LCOV - lcov.info - types + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - typesHitTotalCoverage
Test:lcov.infoLines:363894.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_description.dart +
85.7%85.7%
+
85.7 %12 / 14-0 / 0
camera_exception.dart +
100.0%
+
100.0 %3 / 3-0 / 0
flash_mode.dart +
100.0%
+
100.0 %5 / 5-0 / 0
resolution_preset.dart +
100.0%
+
100.0 %7 / 7-0 / 0
image_format_group.dart +
100.0%
+
100.0 %9 / 9-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/index.html b/packages/camera/camera_platform_interface/coverage/html/types/index.html new file mode 100644 index 000000000000..ded928c90dc4 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/index.html @@ -0,0 +1,133 @@ + + + + + + + LCOV - lcov.info - types + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - typesHitTotalCoverage
Test:lcov.infoLines:363894.7 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_description.dart +
85.7%85.7%
+
85.7 %12 / 14-0 / 0
camera_exception.dart +
100.0%
+
100.0 %3 / 3-0 / 0
flash_mode.dart +
100.0%
+
100.0 %5 / 5-0 / 0
image_format_group.dart +
100.0%
+
100.0 %9 / 9-0 / 0
resolution_preset.dart +
100.0%
+
100.0 %7 / 7-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func-sort-c.html new file mode 100644 index 000000000000..5bbb45034ce6 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/resolution_preset.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - resolution_preset.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:77100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func.html new file mode 100644 index 000000000000..87eed3a643ae --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - types/resolution_preset.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - resolution_preset.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:77100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.gcov.html new file mode 100644 index 000000000000..4ffdbdd36f38 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.gcov.html @@ -0,0 +1,102 @@ + + + + + + + LCOV - lcov.info - types/resolution_preset.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - types - resolution_preset.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:77100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : // Copyright 2019 The Chromium Authors. All rights reserved.
+       2             : // Use of this source code is governed by a BSD-style license that can be
+       3             : // found in the LICENSE file.
+       4             : 
+       5             : /// Affect the quality of video recording and image capture:
+       6             : ///
+       7             : /// If a preset is not available on the camera being used a preset of lower quality will be selected automatically.
+       8           9 : enum ResolutionPreset {
+       9             :   /// 352x288 on iOS, 240p (320x240) on Android
+      10           9 :   low,
+      11             : 
+      12             :   /// 480p (640x480 on iOS, 720x480 on Android)
+      13           9 :   medium,
+      14             : 
+      15             :   /// 720p (1280x720)
+      16           9 :   high,
+      17             : 
+      18             :   /// 1080p (1920x1080)
+      19           9 :   veryHigh,
+      20             : 
+      21             :   /// 2160p (3840x2160)
+      22           9 :   ultraHigh,
+      23             : 
+      24             :   /// The highest resolution available.
+      25           9 :   max,
+      26             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/updown.png b/packages/camera/camera_platform_interface/coverage/html/updown.png new file mode 100644 index 0000000000000000000000000000000000000000..aa56a238b3e6c435265250f9266cd1b8caba0f20 GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`*?77*hG?8mPH5^{)z4*}Q$iB}huR`+ literal 0 HcmV?d00001 diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-f.html new file mode 100644 index 000000000000..1381f76d534d --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-f.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils.dart +
100.0%
+
100.0 %5 / 5-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-l.html new file mode 100644 index 000000000000..d1335ad88648 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-l.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils.dart +
100.0%
+
100.0 %5 / 5-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/index.html b/packages/camera/camera_platform_interface/coverage/html/utils/index.html new file mode 100644 index 000000000000..695376716ee5 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/utils/index.html @@ -0,0 +1,93 @@ + + + + + + + LCOV - lcov.info - utils + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils.dart +
100.0%
+
100.0 %5 / 5-0 / 0
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func-sort-c.html new file mode 100644 index 000000000000..4c8ad0a79b3c --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func-sort-c.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - utils/utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func.html new file mode 100644 index 000000000000..db0ea2bc90e9 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func.html @@ -0,0 +1,72 @@ + + + + + + + LCOV - lcov.info - utils/utils.dart - functions + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ +
+ + + + + + +

Function Name Sort by function nameHit count Sort by hit count
+
+
+ + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.gcov.html new file mode 100644 index 000000000000..1e567a1f97f5 --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.gcov.html @@ -0,0 +1,90 @@ + + + + + + + LCOV - lcov.info - utils/utils.dart + + + + + + + + + + + + + + +
LCOV - code coverage report
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Current view:top level - utils - utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
+
+ + + + + + + + +

+
          Line data    Source code
+
+       1             : import 'package:camera_platform_interface/camera_platform_interface.dart';
+       2             : 
+       3             : /// Parses a string into a corresponding CameraLensDirection.
+       4           2 : CameraLensDirection parseCameraLensDirection(String string) {
+       5             :   switch (string) {
+       6           2 :     case 'front':
+       7             :       return CameraLensDirection.front;
+       8           2 :     case 'back':
+       9             :       return CameraLensDirection.back;
+      10           1 :     case 'external':
+      11             :       return CameraLensDirection.external;
+      12             :   }
+      13           1 :   throw ArgumentError('Unknown CameraLensDirection value');
+      14             : }
+
+
+
+ + + + +
Generated by: LCOV version 1.15
+
+ + + diff --git a/packages/camera/camera_platform_interface/coverage/lcov.info b/packages/camera/camera_platform_interface/coverage/lcov.info new file mode 100644 index 000000000000..6d005222231d --- /dev/null +++ b/packages/camera/camera_platform_interface/coverage/lcov.info @@ -0,0 +1,305 @@ +SF:lib/src/events/camera_event.dart +DA:27,2 +DA:29,2 +DA:32,2 +DA:33,6 +DA:34,6 +DA:36,1 +DA:37,2 +DA:53,2 +DA:57,2 +DA:61,1 +DA:62,1 +DA:63,1 +DA:64,2 +DA:68,4 +DA:69,2 +DA:70,2 +DA:71,2 +DA:74,2 +DA:77,2 +DA:78,2 +DA:79,6 +DA:80,6 +DA:81,6 +DA:83,1 +DA:85,7 +DA:101,2 +DA:105,2 +DA:109,1 +DA:110,1 +DA:111,1 +DA:112,2 +DA:116,4 +DA:117,2 +DA:118,2 +DA:119,2 +DA:122,2 +DA:125,2 +DA:126,2 +DA:127,6 +DA:128,6 +DA:129,6 +DA:131,1 +DA:133,7 +DA:140,4 +DA:144,1 +DA:145,2 +DA:149,4 +DA:150,2 +DA:153,2 +DA:156,2 +DA:157,2 +DA:158,6 +DA:160,1 +DA:161,1 +DA:173,4 +DA:177,1 +DA:178,1 +DA:179,2 +DA:183,4 +DA:184,2 +DA:185,2 +DA:188,2 +DA:191,2 +DA:192,2 +DA:193,6 +DA:194,6 +DA:196,1 +DA:197,4 +LF:68 +LH:68 +end_of_record +SF:lib/src/platform_interface/camera_platform.dart +DA:23,6 +DA:25,6 +DA:27,3 +DA:32,2 +DA:36,1 +DA:37,2 +DA:42,1 +DA:43,1 +DA:47,1 +DA:52,1 +DA:60,1 +DA:61,1 +DA:65,1 +DA:66,1 +DA:70,1 +DA:71,1 +DA:75,1 +DA:76,1 +DA:80,1 +DA:81,1 +DA:85,1 +DA:86,1 +DA:90,1 +DA:91,1 +DA:97,1 +DA:98,1 +DA:102,1 +DA:103,1 +DA:107,1 +DA:108,1 +DA:112,1 +DA:113,1 +DA:117,1 +DA:118,1 +DA:122,1 +DA:123,1 +DA:127,1 +DA:128,1 +DA:136,1 +DA:137,1 +DA:141,0 +DA:142,0 +DA:146,1 +DA:147,1 +LF:44 +LH:42 +end_of_record +SF:lib/src/method_channel/method_channel_camera.dart +DA:33,1 +DA:34,2 +DA:35,4 +DA:38,1 +DA:40,1 +DA:41,1 +DA:42,2 +DA:43,1 +DA:44,1 +DA:45,2 +DA:46,1 +DA:48,1 +DA:49,1 +DA:50,3 +DA:55,1 +DA:62,2 +DA:64,1 +DA:65,1 +DA:67,1 +DA:72,1 +DA:73,1 +DA:74,3 +DA:78,1 +DA:80,3 +DA:81,2 +DA:82,1 +DA:83,0 +DA:87,1 +DA:89,4 +DA:90,1 +DA:93,1 +DA:95,1 +DA:97,1 +DA:101,1 +DA:105,1 +DA:106,2 +DA:108,1 +DA:111,2 +DA:112,3 +DA:113,2 +DA:117,1 +DA:119,2 +DA:122,1 +DA:124,2 +DA:127,1 +DA:129,2 +DA:132,1 +DA:134,2 +DA:138,1 +DA:139,2 +DA:141,1 +DA:143,1 +DA:146,1 +DA:148,1 +DA:151,1 +DA:152,2 +DA:154,1 +DA:159,1 +DA:160,2 +DA:162,1 +DA:164,1 +DA:167,1 +DA:168,1 +DA:170,1 +DA:173,1 +DA:175,1 +DA:177,1 +DA:180,1 +DA:182,1 +DA:184,1 +DA:186,1 +DA:190,1 +DA:191,1 +DA:193,1 +DA:196,1 +DA:197,1 +DA:199,1 +DA:203,1 +DA:205,2 +DA:207,1 +DA:212,1 +DA:213,3 +DA:217,1 +DA:219,1 +DA:223,1 +DA:225,1 +DA:227,1 +DA:229,1 +DA:231,0 +DA:234,0 +DA:239,1 +DA:241,1 +DA:243,1 +DA:245,1 +DA:247,1 +DA:249,0 +DA:251,0 +DA:254,0 +DA:263,1 +DA:264,1 +DA:265,1 +DA:266,3 +DA:268,2 +DA:269,2 +DA:272,1 +DA:273,3 +DA:275,2 +DA:276,2 +DA:279,1 +DA:280,3 +DA:284,1 +DA:285,3 +DA:287,2 +DA:291,1 +LF:114 +LH:108 +end_of_record +SF:lib/src/types/image_format_group.dart +DA:2,9 +DA:4,9 +DA:17,9 +DA:23,9 +DA:29,9 +DA:37,2 +DA:39,2 +DA:41,2 +DA:43,2 +LF:9 +LH:9 +end_of_record +SF:lib/src/utils/utils.dart +DA:4,2 +DA:6,2 +DA:8,2 +DA:10,1 +DA:13,1 +LF:5 +LH:5 +end_of_record +SF:lib/src/types/camera_description.dart +DA:6,9 +DA:8,9 +DA:11,9 +DA:14,9 +DA:20,2 +DA:37,2 +DA:40,2 +DA:41,6 +DA:42,6 +DA:43,6 +DA:45,1 +DA:46,5 +DA:48,0 +DA:50,0 +LF:14 +LH:12 +end_of_record +SF:lib/src/types/camera_exception.dart +DA:8,2 +DA:18,1 +DA:19,3 +LF:3 +LH:3 +end_of_record +SF:lib/src/types/flash_mode.dart +DA:6,9 +DA:8,9 +DA:11,9 +DA:14,9 +DA:17,9 +LF:5 +LH:5 +end_of_record +SF:lib/src/types/resolution_preset.dart +DA:8,9 +DA:10,9 +DA:13,9 +DA:16,9 +DA:19,9 +DA:22,9 +DA:25,9 +LF:7 +LH:7 +end_of_record diff --git a/packages/camera/camera_platform_interface/lib/src/events/camera_event.dart b/packages/camera/camera_platform_interface/lib/src/events/camera_event.dart index 60f69bafa15f..ad9958381143 100644 --- a/packages/camera/camera_platform_interface/lib/src/events/camera_event.dart +++ b/packages/camera/camera_platform_interface/lib/src/events/camera_event.dart @@ -240,6 +240,7 @@ class CameraErrorEvent extends CameraEvent { class VideoRecordedEvent extends CameraEvent { /// XFile of the recorded video. final XFile file; + /// Maximum duration of the recorded video. final Duration maxVideoDuration; @@ -263,18 +264,18 @@ class VideoRecordedEvent extends CameraEvent { /// Converts the [VideoRecordedEvent] instance into a [Map] instance that can be /// serialized to JSON. Map toJson() => { - 'cameraId': cameraId, - 'path': file.path, - 'maxVideoDuration': maxVideoDuration?.inMilliseconds - }; + 'cameraId': cameraId, + 'path': file.path, + 'maxVideoDuration': maxVideoDuration?.inMilliseconds + }; @override bool operator ==(Object other) => identical(this, other) || - super == other && - other is VideoRecordedEvent && - runtimeType == other.runtimeType && - maxVideoDuration == other.maxVideoDuration; + super == other && + other is VideoRecordedEvent && + runtimeType == other.runtimeType && + maxVideoDuration == other.maxVideoDuration; @override int get hashCode => From 06fd5667e8cda8deb064282f724e7b8c61733fe4 Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 14:06:25 +0100 Subject: [PATCH 09/18] Remove coverage folders --- .../camera/camera/coverage/html/amber.png | Bin 141 -> 0 bytes .../camera/camera/coverage/html/emerald.png | Bin 141 -> 0 bytes packages/camera/camera/coverage/html/gcov.css | 519 ---------------- .../camera/camera/coverage/html/glass.png | Bin 167 -> 0 bytes .../camera/coverage/html/index-sort-f.html | 103 ---- .../camera/coverage/html/index-sort-l.html | 103 ---- .../camera/camera/coverage/html/index.html | 103 ---- packages/camera/camera/coverage/html/ruby.png | Bin 141 -> 0 bytes packages/camera/camera/coverage/html/snow.png | Bin 141 -> 0 bytes .../camera_controller.dart.func-sort-c.html | 72 --- .../html/src/camera_controller.dart.func.html | 72 --- .../html/src/camera_controller.dart.gcov.html | 571 ------------------ .../src/camera_image.dart.func-sort-c.html | 72 --- .../html/src/camera_image.dart.func.html | 72 --- .../html/src/camera_image.dart.gcov.html | 235 ------- .../src/camera_preview.dart.func-sort-c.html | 72 --- .../html/src/camera_preview.dart.func.html | 72 --- .../html/src/camera_preview.dart.gcov.html | 99 --- .../coverage/html/src/index-sort-f.html | 113 ---- .../coverage/html/src/index-sort-l.html | 113 ---- .../camera/coverage/html/src/index.html | 113 ---- .../camera/camera/coverage/html/updown.png | Bin 117 -> 0 bytes .../image_format_utils.dart.func-sort-c.html | 72 --- .../utils/image_format_utils.dart.func.html | 72 --- .../utils/image_format_utils.dart.gcov.html | 110 ---- .../coverage/html/utils/index-sort-f.html | 93 --- .../coverage/html/utils/index-sort-l.html | 93 --- .../camera/coverage/html/utils/index.html | 93 --- packages/camera/camera/coverage/lcov.info | 202 ------- .../coverage/html/amber.png | Bin 141 -> 0 bytes .../coverage/html/emerald.png | Bin 141 -> 0 bytes .../events/camera_event.dart.func-sort-c.html | 72 --- .../html/events/camera_event.dart.func.html | 72 --- .../html/events/camera_event.dart.gcov.html | 274 --------- .../coverage/html/events/index-sort-f.html | 93 --- .../coverage/html/events/index-sort-l.html | 93 --- .../coverage/html/events/index.html | 93 --- .../coverage/html/gcov.css | 519 ---------------- .../coverage/html/glass.png | Bin 167 -> 0 bytes .../coverage/html/index-sort-f.html | 133 ---- .../coverage/html/index-sort-l.html | 133 ---- .../coverage/html/index.html | 133 ---- .../html/method_channel/index-sort-f.html | 93 --- .../html/method_channel/index-sort-l.html | 93 --- .../coverage/html/method_channel/index.html | 93 --- ...ethod_channel_camera.dart.func-sort-c.html | 72 --- .../method_channel_camera.dart.func.html | 72 --- .../method_channel_camera.dart.gcov.html | 370 ------------ .../camera_platform.dart.func-sort-c.html | 72 --- .../camera_platform.dart.func.html | 72 --- .../camera_platform.dart.gcov.html | 225 ------- .../html/platform_interface/index-sort-f.html | 93 --- .../html/platform_interface/index-sort-l.html | 93 --- .../html/platform_interface/index.html | 93 --- .../coverage/html/ruby.png | Bin 141 -> 0 bytes .../coverage/html/snow.png | Bin 141 -> 0 bytes .../camera_description.dart.func-sort-c.html | 72 --- .../types/camera_description.dart.func.html | 72 --- .../types/camera_description.dart.gcov.html | 128 ---- .../camera_exception.dart.func-sort-c.html | 72 --- .../types/camera_exception.dart.func.html | 72 --- .../types/camera_exception.dart.gcov.html | 96 --- .../types/flash_mode.dart.func-sort-c.html | 72 --- .../html/types/flash_mode.dart.func.html | 72 --- .../html/types/flash_mode.dart.gcov.html | 94 --- .../image_format_group.dart.func-sort-c.html | 72 --- .../types/image_format_group.dart.func.html | 72 --- .../types/image_format_group.dart.gcov.html | 126 ---- .../coverage/html/types/index-sort-f.html | 133 ---- .../coverage/html/types/index-sort-l.html | 133 ---- .../coverage/html/types/index.html | 133 ---- .../resolution_preset.dart.func-sort-c.html | 72 --- .../types/resolution_preset.dart.func.html | 72 --- .../types/resolution_preset.dart.gcov.html | 102 ---- .../coverage/html/updown.png | Bin 117 -> 0 bytes .../coverage/html/utils/index-sort-f.html | 93 --- .../coverage/html/utils/index-sort-l.html | 93 --- .../coverage/html/utils/index.html | 93 --- .../html/utils/utils.dart.func-sort-c.html | 72 --- .../coverage/html/utils/utils.dart.func.html | 72 --- .../coverage/html/utils/utils.dart.gcov.html | 90 --- .../coverage/lcov.info | 305 ---------- 82 files changed, 8778 deletions(-) delete mode 100644 packages/camera/camera/coverage/html/amber.png delete mode 100644 packages/camera/camera/coverage/html/emerald.png delete mode 100644 packages/camera/camera/coverage/html/gcov.css delete mode 100644 packages/camera/camera/coverage/html/glass.png delete mode 100644 packages/camera/camera/coverage/html/index-sort-f.html delete mode 100644 packages/camera/camera/coverage/html/index-sort-l.html delete mode 100644 packages/camera/camera/coverage/html/index.html delete mode 100644 packages/camera/camera/coverage/html/ruby.png delete mode 100644 packages/camera/camera/coverage/html/snow.png delete mode 100644 packages/camera/camera/coverage/html/src/camera_controller.dart.func-sort-c.html delete mode 100644 packages/camera/camera/coverage/html/src/camera_controller.dart.func.html delete mode 100644 packages/camera/camera/coverage/html/src/camera_controller.dart.gcov.html delete mode 100644 packages/camera/camera/coverage/html/src/camera_image.dart.func-sort-c.html delete mode 100644 packages/camera/camera/coverage/html/src/camera_image.dart.func.html delete mode 100644 packages/camera/camera/coverage/html/src/camera_image.dart.gcov.html delete mode 100644 packages/camera/camera/coverage/html/src/camera_preview.dart.func-sort-c.html delete mode 100644 packages/camera/camera/coverage/html/src/camera_preview.dart.func.html delete mode 100644 packages/camera/camera/coverage/html/src/camera_preview.dart.gcov.html delete mode 100644 packages/camera/camera/coverage/html/src/index-sort-f.html delete mode 100644 packages/camera/camera/coverage/html/src/index-sort-l.html delete mode 100644 packages/camera/camera/coverage/html/src/index.html delete mode 100644 packages/camera/camera/coverage/html/updown.png delete mode 100644 packages/camera/camera/coverage/html/utils/image_format_utils.dart.func-sort-c.html delete mode 100644 packages/camera/camera/coverage/html/utils/image_format_utils.dart.func.html delete mode 100644 packages/camera/camera/coverage/html/utils/image_format_utils.dart.gcov.html delete mode 100644 packages/camera/camera/coverage/html/utils/index-sort-f.html delete mode 100644 packages/camera/camera/coverage/html/utils/index-sort-l.html delete mode 100644 packages/camera/camera/coverage/html/utils/index.html delete mode 100644 packages/camera/camera/coverage/lcov.info delete mode 100644 packages/camera/camera_platform_interface/coverage/html/amber.png delete mode 100644 packages/camera/camera_platform_interface/coverage/html/emerald.png delete mode 100644 packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/events/index-sort-f.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/events/index-sort-l.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/events/index.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/gcov.css delete mode 100644 packages/camera/camera_platform_interface/coverage/html/glass.png delete mode 100644 packages/camera/camera_platform_interface/coverage/html/index-sort-f.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/index-sort-l.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/index.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-f.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-l.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/index.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-f.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-l.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/platform_interface/index.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/ruby.png delete mode 100644 packages/camera/camera_platform_interface/coverage/html/snow.png delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/index-sort-f.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/index-sort-l.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/index.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/updown.png delete mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/index-sort-f.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/index-sort-l.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/index.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func-sort-c.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func.html delete mode 100644 packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.gcov.html delete mode 100644 packages/camera/camera_platform_interface/coverage/lcov.info diff --git a/packages/camera/camera/coverage/html/amber.png b/packages/camera/camera/coverage/html/amber.png deleted file mode 100644 index 2cab170d8359081983a4e343848dfe06bc490f12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^G2tW}LqE04T&+ z;1OBOz`!j8!i<;h*8KqrvZOouIx;Y9?C1WI$O`1M1^9%x{(levWG?NMQuI!iC1^Jb!lvI6;R0X`wF(yt=9xVZRt1vCRixIA4P dLn>}1Cji+@42)0J?}79&c)I$ztaD0e0sy@GAL0N2 diff --git a/packages/camera/camera/coverage/html/gcov.css b/packages/camera/camera/coverage/html/gcov.css deleted file mode 100644 index bfd0a83e10b5..000000000000 --- a/packages/camera/camera/coverage/html/gcov.css +++ /dev/null @@ -1,519 +0,0 @@ -/* All views: initial background and text color */ -body -{ - color: #000000; - background-color: #FFFFFF; -} - -/* All views: standard link format*/ -a:link -{ - color: #284FA8; - text-decoration: underline; -} - -/* All views: standard link - visited format */ -a:visited -{ - color: #00CB40; - text-decoration: underline; -} - -/* All views: standard link - activated format */ -a:active -{ - color: #FF0040; - text-decoration: underline; -} - -/* All views: main title format */ -td.title -{ - text-align: center; - padding-bottom: 10px; - font-family: sans-serif; - font-size: 20pt; - font-style: italic; - font-weight: bold; -} - -/* All views: header item format */ -td.headerItem -{ - text-align: right; - padding-right: 6px; - font-family: sans-serif; - font-weight: bold; - vertical-align: top; - white-space: nowrap; -} - -/* All views: header item value format */ -td.headerValue -{ - text-align: left; - color: #284FA8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; -} - -/* All views: header item coverage table heading */ -td.headerCovTableHead -{ - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - font-size: 80%; - white-space: nowrap; -} - -/* All views: header item coverage table entry */ -td.headerCovTableEntry -{ - text-align: right; - color: #284FA8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #DAE7FE; -} - -/* All views: header item coverage table entry for high coverage rate */ -td.headerCovTableEntryHi -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #A7FC9D; -} - -/* All views: header item coverage table entry for medium coverage rate */ -td.headerCovTableEntryMed -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #FFEA20; -} - -/* All views: header item coverage table entry for ow coverage rate */ -td.headerCovTableEntryLo -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #FF0000; -} - -/* All views: header legend value for legend entry */ -td.headerValueLeg -{ - text-align: left; - color: #000000; - font-family: sans-serif; - font-size: 80%; - white-space: nowrap; - padding-top: 4px; -} - -/* All views: color of horizontal ruler */ -td.ruler -{ - background-color: #6688D4; -} - -/* All views: version string format */ -td.versionInfo -{ - text-align: center; - padding-top: 2px; - font-family: sans-serif; - font-style: italic; -} - -/* Directory view/File view (all)/Test case descriptions: - table headline format */ -td.tableHead -{ - text-align: center; - color: #FFFFFF; - background-color: #6688D4; - font-family: sans-serif; - font-size: 120%; - font-weight: bold; - white-space: nowrap; - padding-left: 4px; - padding-right: 4px; -} - -span.tableHeadSort -{ - padding-right: 4px; -} - -/* Directory view/File view (all): filename entry format */ -td.coverFile -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284FA8; - background-color: #DAE7FE; - font-family: monospace; -} - -/* Directory view/File view (all): bar-graph entry format*/ -td.coverBar -{ - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; -} - -/* Directory view/File view (all): bar-graph outline color */ -td.coverBarOutline -{ - background-color: #000000; -} - -/* Directory view/File view (all): percentage entry for files with - high coverage rate */ -td.coverPerHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #A7FC9D; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - high coverage rate */ -td.coverNumHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #A7FC9D; - white-space: nowrap; - font-family: sans-serif; -} - -/* Directory view/File view (all): percentage entry for files with - medium coverage rate */ -td.coverPerMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FFEA20; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - medium coverage rate */ -td.coverNumMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FFEA20; - white-space: nowrap; - font-family: sans-serif; -} - -/* Directory view/File view (all): percentage entry for files with - low coverage rate */ -td.coverPerLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - low coverage rate */ -td.coverNumLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - white-space: nowrap; - font-family: sans-serif; -} - -/* File view (all): "show/hide details" link format */ -a.detail:link -{ - color: #B8D0FF; - font-size:80%; -} - -/* File view (all): "show/hide details" link - visited format */ -a.detail:visited -{ - color: #B8D0FF; - font-size:80%; -} - -/* File view (all): "show/hide details" link - activated format */ -a.detail:active -{ - color: #FFFFFF; - font-size:80%; -} - -/* File view (detail): test name entry */ -td.testName -{ - text-align: right; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; -} - -/* File view (detail): test percentage entry */ -td.testPer -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; -} - -/* File view (detail): test lines count entry */ -td.testNum -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; -} - -/* Test case descriptions: test name format*/ -dt -{ - font-family: sans-serif; - font-weight: bold; -} - -/* Test case descriptions: description table body */ -td.testDescription -{ - padding-top: 10px; - padding-left: 30px; - padding-bottom: 10px; - padding-right: 30px; - background-color: #DAE7FE; -} - -/* Source code view: function entry */ -td.coverFn -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284FA8; - background-color: #DAE7FE; - font-family: monospace; -} - -/* Source code view: function entry zero count*/ -td.coverFnLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - font-weight: bold; - font-family: sans-serif; -} - -/* Source code view: function entry nonzero count*/ -td.coverFnHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-weight: bold; - font-family: sans-serif; -} - -/* Source code view: source code format */ -pre.source -{ - font-family: monospace; - white-space: pre; - margin-top: 2px; -} - -/* Source code view: line number format */ -span.lineNum -{ - background-color: #EFE383; -} - -/* Source code view: format for lines which were executed */ -td.lineCov, -span.lineCov -{ - background-color: #CAD7FE; -} - -/* Source code view: format for Cov legend */ -span.coverLegendCov -{ - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #CAD7FE; -} - -/* Source code view: format for lines which were not executed */ -td.lineNoCov, -span.lineNoCov -{ - background-color: #FF6230; -} - -/* Source code view: format for NoCov legend */ -span.coverLegendNoCov -{ - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #FF6230; -} - -/* Source code view (function table): standard link - visited format */ -td.lineNoCov > a:visited, -td.lineCov > a:visited -{ - color: black; - text-decoration: underline; -} - -/* Source code view: format for lines which were executed only in a - previous version */ -span.lineDiffCov -{ - background-color: #B5F7AF; -} - -/* Source code view: format for branches which were executed - * and taken */ -span.branchCov -{ - background-color: #CAD7FE; -} - -/* Source code view: format for branches which were executed - * but not taken */ -span.branchNoCov -{ - background-color: #FF6230; -} - -/* Source code view: format for branches which were not executed */ -span.branchNoExec -{ - background-color: #FF6230; -} - -/* Source code view: format for the source code heading line */ -pre.sourceHeading -{ - white-space: pre; - font-family: monospace; - font-weight: bold; - margin: 0px; -} - -/* All views: header legend value for low rate */ -td.headerValueLegL -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 4px; - padding-right: 2px; - background-color: #FF0000; - font-size: 80%; -} - -/* All views: header legend value for med rate */ -td.headerValueLegM -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 2px; - background-color: #FFEA20; - font-size: 80%; -} - -/* All views: header legend value for hi rate */ -td.headerValueLegH -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 4px; - background-color: #A7FC9D; - font-size: 80%; -} - -/* All views except source code view: legend format for low coverage */ -span.coverLegendCovLo -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #FF0000; -} - -/* All views except source code view: legend format for med coverage */ -span.coverLegendCovMed -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #FFEA20; -} - -/* All views except source code view: legend format for hi coverage */ -span.coverLegendCovHi -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #A7FC9D; -} diff --git a/packages/camera/camera/coverage/html/glass.png b/packages/camera/camera/coverage/html/glass.png deleted file mode 100644 index e1abc00680a3093c49fdb775ae6bdb6764c95af2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)gaEa{HEjtmSN`?>!lvI6;R0X`wF z|Ns97GD8ntt^-nxB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gf+eGhVt|_XjA* zUgGKN%6^Gmn4d%Ph(nkFP>9RZ#WAE}PI3Z}&BVayv3^M*kj3EX>gTe~DWM4f=_Dpv diff --git a/packages/camera/camera/coverage/html/index-sort-f.html b/packages/camera/camera/coverage/html/index-sort-f.html deleted file mode 100644 index 6bc890af8a2e..000000000000 --- a/packages/camera/camera/coverage/html/index-sort-f.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12818668.8 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils -
63.6%63.6%
-
63.6 %7 / 11-0 / 0
src -
69.1%69.1%
-
69.1 %121 / 175-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/index-sort-l.html b/packages/camera/camera/coverage/html/index-sort-l.html deleted file mode 100644 index c2f7c1b5a962..000000000000 --- a/packages/camera/camera/coverage/html/index-sort-l.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12818668.8 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils -
63.6%63.6%
-
63.6 %7 / 11-0 / 0
src -
69.1%69.1%
-
69.1 %121 / 175-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/index.html b/packages/camera/camera/coverage/html/index.html deleted file mode 100644 index b011287a6d85..000000000000 --- a/packages/camera/camera/coverage/html/index.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:12818668.8 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
src -
69.1%69.1%
-
69.1 %121 / 175-0 / 0
utils -
63.6%63.6%
-
63.6 %7 / 11-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/ruby.png b/packages/camera/camera/coverage/html/ruby.png deleted file mode 100644 index 991b6d4ec9e78be165e3ef757eed1aada287364d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^FceV#7`HfI^%F z9+AZi4BSE>%y{W;-5;PJOS+@4BLl<6e(pbstUx|nfKQ0)e^Y%R^MdiLxj>4`)5S5Q b;#P73kj=!v_*DHKNFRfztDnm{r-UW|iOwIS diff --git a/packages/camera/camera/coverage/html/snow.png b/packages/camera/camera/coverage/html/snow.png deleted file mode 100644 index 2cdae107fceec6e7f02ac7acb4a34a82a540caa5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^MM!lvI6;R0X`wF|Ns97GD8ntt^-nBo-U3d c6}OTTfNUlP#;5A{K>8RwUHx3vIVCg!071?oo&W#< diff --git a/packages/camera/camera/coverage/html/src/camera_controller.dart.func-sort-c.html b/packages/camera/camera/coverage/html/src/camera_controller.dart.func-sort-c.html deleted file mode 100644 index 29c417f5bdd7..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_controller.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_controller.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_controller.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:9714566.9 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/camera_controller.dart.func.html b/packages/camera/camera/coverage/html/src/camera_controller.dart.func.html deleted file mode 100644 index e90f8f2ac308..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_controller.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_controller.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_controller.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:9714566.9 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/camera_controller.dart.gcov.html b/packages/camera/camera/coverage/html/src/camera_controller.dart.gcov.html deleted file mode 100644 index 2f6e2c4fe94c..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_controller.dart.gcov.html +++ /dev/null @@ -1,571 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_controller.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_controller.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:9714566.9 %
Date:2020-12-22 12:19:05Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : import 'dart:async';
-       6             : 
-       7             : import 'package:camera/camera.dart';
-       8             : import 'package:camera_platform_interface/camera_platform_interface.dart';
-       9             : import 'package:flutter/foundation.dart';
-      10             : import 'package:flutter/material.dart';
-      11             : import 'package:flutter/services.dart';
-      12             : 
-      13             : import '../utils/image_format_utils.dart';
-      14             : 
-      15           2 : final MethodChannel _channel = const MethodChannel('plugins.flutter.io/camera');
-      16             : 
-      17             : /// Signature for a callback receiving the a camera image.
-      18             : ///
-      19             : /// This is used by [CameraController.startImageStream].
-      20             : // ignore: inference_failure_on_function_return_type
-      21             : typedef onLatestImageAvailable = Function(CameraImage image);
-      22             : 
-      23             : /// Completes with a list of available cameras.
-      24             : ///
-      25             : /// May throw a [CameraException].
-      26           1 : Future<List<CameraDescription>> availableCameras() async {
-      27           2 :   return CameraPlatform.instance.availableCameras();
-      28             : }
-      29             : 
-      30             : /// The state of a [CameraController].
-      31             : class CameraValue {
-      32             :   /// Creates a new camera controller state.
-      33           3 :   const CameraValue({
-      34             :     this.isInitialized,
-      35             :     this.errorDescription,
-      36             :     this.previewSize,
-      37             :     this.isRecordingVideo,
-      38             :     this.isTakingPicture,
-      39             :     this.isStreamingImages,
-      40             :     bool isRecordingPaused,
-      41             :   }) : _isRecordingPaused = isRecordingPaused;
-      42             : 
-      43             :   /// Creates a new camera controller state for an uninitialized controller.
-      44           0 :   const CameraValue.uninitialized()
-      45           0 :       : this(
-      46             :           isInitialized: false,
-      47             :           isRecordingVideo: false,
-      48             :           isTakingPicture: false,
-      49             :           isStreamingImages: false,
-      50             :           isRecordingPaused: false,
-      51             :         );
-      52             : 
-      53             :   /// True after [CameraController.initialize] has completed successfully.
-      54             :   final bool isInitialized;
-      55             : 
-      56             :   /// True when a picture capture request has been sent but as not yet returned.
-      57             :   final bool isTakingPicture;
-      58             : 
-      59             :   /// True when the camera is recording (not the same as previewing).
-      60             :   final bool isRecordingVideo;
-      61             : 
-      62             :   /// True when images from the camera are being streamed.
-      63             :   final bool isStreamingImages;
-      64             : 
-      65             :   final bool _isRecordingPaused;
-      66             : 
-      67             :   /// True when camera [isRecordingVideo] and recording is paused.
-      68           2 :   bool get isRecordingPaused => isRecordingVideo && _isRecordingPaused;
-      69             : 
-      70             :   /// Description of an error state.
-      71             :   ///
-      72             :   /// This is null while the controller is not in an error state.
-      73             :   /// When [hasError] is true this contains the error description.
-      74             :   final String errorDescription;
-      75             : 
-      76             :   /// The size of the preview in pixels.
-      77             :   ///
-      78             :   /// Is `null` until  [isInitialized] is `true`.
-      79             :   final Size previewSize;
-      80             : 
-      81             :   /// Convenience getter for `previewSize.height / previewSize.width`.
-      82             :   ///
-      83             :   /// Can only be called when [initialize] is done.
-      84          12 :   double get aspectRatio => previewSize.height / previewSize.width;
-      85             : 
-      86             :   /// Whether the controller is in an error state.
-      87             :   ///
-      88             :   /// When true [errorDescription] describes the error.
-      89           2 :   bool get hasError => errorDescription != null;
-      90             : 
-      91             :   /// Creates a modified copy of the object.
-      92             :   ///
-      93             :   /// Explicitly specified fields get the specified value, all other fields get
-      94             :   /// the same value of the current object.
-      95           3 :   CameraValue copyWith({
-      96             :     bool isInitialized,
-      97             :     bool isRecordingVideo,
-      98             :     bool isTakingPicture,
-      99             :     bool isStreamingImages,
-     100             :     String errorDescription,
-     101             :     Size previewSize,
-     102             :     bool isRecordingPaused,
-     103             :   }) {
-     104           3 :     return CameraValue(
-     105           3 :       isInitialized: isInitialized ?? this.isInitialized,
-     106             :       errorDescription: errorDescription,
-     107           3 :       previewSize: previewSize ?? this.previewSize,
-     108           3 :       isRecordingVideo: isRecordingVideo ?? this.isRecordingVideo,
-     109           3 :       isTakingPicture: isTakingPicture ?? this.isTakingPicture,
-     110           3 :       isStreamingImages: isStreamingImages ?? this.isStreamingImages,
-     111           3 :       isRecordingPaused: isRecordingPaused ?? _isRecordingPaused,
-     112             :     );
-     113             :   }
-     114             : 
-     115           1 :   @override
-     116             :   String toString() {
-     117           2 :     return '$runtimeType('
-     118           1 :         'isRecordingVideo: $isRecordingVideo, '
-     119           1 :         'isInitialized: $isInitialized, '
-     120           1 :         'errorDescription: $errorDescription, '
-     121           1 :         'previewSize: $previewSize, '
-     122           1 :         'isStreamingImages: $isStreamingImages)';
-     123             :   }
-     124             : }
-     125             : 
-     126             : /// Controls a device camera.
-     127             : ///
-     128             : /// Use [availableCameras] to get a list of available cameras.
-     129             : ///
-     130             : /// Before using a [CameraController] a call to [initialize] must complete.
-     131             : ///
-     132             : /// To show the camera preview on the screen use a [CameraPreview] widget.
-     133             : class CameraController extends ValueNotifier<CameraValue> {
-     134             :   /// Creates a new camera controller in an uninitialized state.
-     135           2 :   CameraController(
-     136             :     this.description,
-     137             :     this.resolutionPreset, {
-     138             :     this.enableAudio = true,
-     139             :     this.imageFormatGroup,
-     140           2 :   }) : super(const CameraValue.uninitialized());
-     141             : 
-     142             :   /// The properties of the camera device controlled by this controller.
-     143             :   final CameraDescription description;
-     144             : 
-     145             :   /// The resolution this controller is targeting.
-     146             :   ///
-     147             :   /// This resolution preset is not guaranteed to be available on the device,
-     148             :   /// if unavailable a lower resolution will be used.
-     149             :   ///
-     150             :   /// See also: [ResolutionPreset].
-     151             :   final ResolutionPreset resolutionPreset;
-     152             : 
-     153             :   /// Whether to include audio when recording a video.
-     154             :   final bool enableAudio;
-     155             : 
-     156             :   /// The [ImageFormatGroup] describes the output of the raw image format.
-     157             :   ///
-     158             :   /// When null the imageFormat will fallback to the platforms default
-     159             :   final ImageFormatGroup imageFormatGroup;
-     160             : 
-     161             :   int _cameraId;
-     162             :   bool _isDisposed = false;
-     163             :   StreamSubscription<dynamic> _imageStreamSubscription;
-     164             :   FutureOr<bool> _initCalled;
-     165             : 
-     166             :   /// Checks whether [CameraController.dispose] has completed successfully.
-     167             :   ///
-     168             :   /// This is a no-op when asserts are disabled.
-     169           1 :   void debugCheckIsDisposed() {
-     170           1 :     assert(_isDisposed);
-     171             :   }
-     172             : 
-     173             :   /// The camera identifier with which the controller is associated.
-     174           0 :   int get cameraId => _cameraId;
-     175             : 
-     176             :   /// Initializes the camera on the device.
-     177             :   ///
-     178             :   /// Throws a [CameraException] if the initialization fails.
-     179           2 :   Future<void> initialize() async {
-     180           2 :     if (_isDisposed) {
-     181           1 :       throw CameraException(
-     182             :         'Disposed CameraController',
-     183             :         'initialize was called on a disposed CameraController',
-     184             :       );
-     185             :     }
-     186             :     try {
-     187           8 :       _cameraId = await CameraPlatform.instance.createCamera(
-     188           2 :         description,
-     189           2 :         resolutionPreset,
-     190           2 :         enableAudio: enableAudio,
-     191             :       );
-     192             : 
-     193             :       final previewSize =
-     194          10 :           CameraPlatform.instance.onCameraInitialized(_cameraId).map((event) {
-     195           2 :         return Size(
-     196           2 :           event.previewWidth,
-     197           2 :           event.previewHeight,
-     198             :         );
-     199           2 :       }).first;
-     200             : 
-     201           6 :       await CameraPlatform.instance.initializeCamera(
-     202           2 :         _cameraId,
-     203           4 :         imageFormatGroup: imageFormatGroupAsIntegerValue(imageFormatGroup),
-     204             :       );
-     205             : 
-     206           6 :       value = value.copyWith(
-     207             :         isInitialized: true,
-     208           2 :         previewSize: await previewSize,
-     209             :       );
-     210           1 :     } on PlatformException catch (e) {
-     211           3 :       throw CameraException(e.code, e.message);
-     212             :     }
-     213             : 
-     214           2 :     _initCalled = true;
-     215             :   }
-     216             : 
-     217             :   /// Prepare the capture session for video recording.
-     218             :   ///
-     219             :   /// Use of this method is optional, but it may be called for performance
-     220             :   /// reasons on iOS.
-     221             :   ///
-     222             :   /// Preparing audio can cause a minor delay in the CameraPreview view on iOS.
-     223             :   /// If video recording is intended, calling this early eliminates this delay
-     224             :   /// that would otherwise be experienced when video recording is started.
-     225             :   /// This operation is a no-op on Android.
-     226             :   ///
-     227             :   /// Throws a [CameraException] if the prepare fails.
-     228           1 :   Future<void> prepareForVideoRecording() async {
-     229           3 :     await CameraPlatform.instance.prepareForVideoRecording();
-     230             :   }
-     231             : 
-     232             :   /// Captures an image and saves it to [path].
-     233             :   ///
-     234             :   /// A path can for example be obtained using
-     235             :   /// [path_provider](https://pub.dartlang.org/packages/path_provider).
-     236             :   ///
-     237             :   /// If a file already exists at the provided path an error will be thrown.
-     238             :   /// The file can be read as this function returns.
-     239             :   ///
-     240             :   /// Throws a [CameraException] if the capture fails.
-     241           1 :   Future<XFile> takePicture() async {
-     242           3 :     if (!value.isInitialized || _isDisposed) {
-     243           1 :       throw CameraException(
-     244             :         'Uninitialized CameraController.',
-     245             :         'takePicture was called on uninitialized CameraController',
-     246             :       );
-     247             :     }
-     248           2 :     if (value.isTakingPicture) {
-     249           1 :       throw CameraException(
-     250             :         'Previous capture has not returned yet.',
-     251             :         'takePicture was called before the previous capture returned.',
-     252             :       );
-     253             :     }
-     254             :     try {
-     255           3 :       value = value.copyWith(isTakingPicture: true);
-     256           4 :       XFile file = await CameraPlatform.instance.takePicture(_cameraId);
-     257           3 :       value = value.copyWith(isTakingPicture: false);
-     258             :       return file;
-     259           1 :     } on PlatformException catch (e) {
-     260           3 :       value = value.copyWith(isTakingPicture: false);
-     261           3 :       throw CameraException(e.code, e.message);
-     262             :     }
-     263             :   }
-     264             : 
-     265             :   /// Start streaming images from platform camera.
-     266             :   ///
-     267             :   /// Settings for capturing images on iOS and Android is set to always use the
-     268             :   /// latest image available from the camera and will drop all other images.
-     269             :   ///
-     270             :   /// When running continuously with [CameraPreview] widget, this function runs
-     271             :   /// best with [ResolutionPreset.low]. Running on [ResolutionPreset.high] can
-     272             :   /// have significant frame rate drops for [CameraPreview] on lower end
-     273             :   /// devices.
-     274             :   ///
-     275             :   /// Throws a [CameraException] if image streaming or video recording has
-     276             :   /// already started.
-     277             :   ///
-     278             :   /// The `startImageStream` method is only available on Android and iOS (other
-     279             :   /// platforms won't be supported in current setup).
-     280             :   ///
-     281             :   // TODO(bmparr): Add settings for resolution and fps.
-     282           1 :   Future<void> startImageStream(onLatestImageAvailable onAvailable) async {
-     283           2 :     assert(defaultTargetPlatform == TargetPlatform.android ||
-     284           0 :         defaultTargetPlatform == TargetPlatform.iOS);
-     285             : 
-     286           3 :     if (!value.isInitialized || _isDisposed) {
-     287           1 :       throw CameraException(
-     288             :         'Uninitialized CameraController',
-     289             :         'startImageStream was called on uninitialized CameraController.',
-     290             :       );
-     291             :     }
-     292           2 :     if (value.isRecordingVideo) {
-     293           1 :       throw CameraException(
-     294             :         'A video recording is already started.',
-     295             :         'startImageStream was called while a video is being recorded.',
-     296             :       );
-     297             :     }
-     298           2 :     if (value.isStreamingImages) {
-     299           1 :       throw CameraException(
-     300             :         'A camera has started streaming images.',
-     301             :         'startImageStream was called while a camera was streaming images.',
-     302             :       );
-     303             :     }
-     304             : 
-     305             :     try {
-     306           3 :       await _channel.invokeMethod<void>('startImageStream');
-     307           3 :       value = value.copyWith(isStreamingImages: true);
-     308           0 :     } on PlatformException catch (e) {
-     309           0 :       throw CameraException(e.code, e.message);
-     310             :     }
-     311             :     const EventChannel cameraEventChannel =
-     312             :         EventChannel('plugins.flutter.io/camera/imageStream');
-     313           1 :     _imageStreamSubscription =
-     314           2 :         cameraEventChannel.receiveBroadcastStream().listen(
-     315           0 :       (dynamic imageData) {
-     316           0 :         onAvailable(CameraImage.fromPlatformData(imageData));
-     317             :       },
-     318             :     );
-     319             :   }
-     320             : 
-     321             :   /// Stop streaming images from platform camera.
-     322             :   ///
-     323             :   /// Throws a [CameraException] if image streaming was not started or video
-     324             :   /// recording was started.
-     325             :   ///
-     326             :   /// The `stopImageStream` method is only available on Android and iOS (other
-     327             :   /// platforms won't be supported in current setup).
-     328           1 :   Future<void> stopImageStream() async {
-     329           2 :     assert(defaultTargetPlatform == TargetPlatform.android ||
-     330           0 :         defaultTargetPlatform == TargetPlatform.iOS);
-     331             : 
-     332           3 :     if (!value.isInitialized || _isDisposed) {
-     333           1 :       throw CameraException(
-     334             :         'Uninitialized CameraController',
-     335             :         'stopImageStream was called on uninitialized CameraController.',
-     336             :       );
-     337             :     }
-     338           2 :     if (value.isRecordingVideo) {
-     339           1 :       throw CameraException(
-     340             :         'A video recording is already started.',
-     341             :         'stopImageStream was called while a video is being recorded.',
-     342             :       );
-     343             :     }
-     344           2 :     if (!value.isStreamingImages) {
-     345           1 :       throw CameraException(
-     346             :         'No camera is streaming images',
-     347             :         'stopImageStream was called when no camera is streaming images.',
-     348             :       );
-     349             :     }
-     350             : 
-     351             :     try {
-     352           3 :       value = value.copyWith(isStreamingImages: false);
-     353           3 :       await _channel.invokeMethod<void>('stopImageStream');
-     354           0 :     } on PlatformException catch (e) {
-     355           0 :       throw CameraException(e.code, e.message);
-     356             :     }
-     357             : 
-     358           3 :     await _imageStreamSubscription.cancel();
-     359           1 :     _imageStreamSubscription = null;
-     360             :   }
-     361             : 
-     362             :   /// Start a video recording.
-     363             :   ///
-     364             :   /// The video is returned as a [XFile] after calling [stopVideoRecording].
-     365             :   /// Throws a [CameraException] if the capture fails.
-     366           1 :   Future<void> startVideoRecording() async {
-     367           3 :     if (!value.isInitialized || _isDisposed) {
-     368           1 :       throw CameraException(
-     369             :         'Uninitialized CameraController',
-     370             :         'startVideoRecording was called on uninitialized CameraController',
-     371             :       );
-     372             :     }
-     373           2 :     if (value.isRecordingVideo) {
-     374           1 :       throw CameraException(
-     375             :         'A video recording is already started.',
-     376             :         'startVideoRecording was called when a recording is already started.',
-     377             :       );
-     378             :     }
-     379           2 :     if (value.isStreamingImages) {
-     380           1 :       throw CameraException(
-     381             :         'A camera has started streaming images.',
-     382             :         'startVideoRecording was called while a camera was streaming images.',
-     383             :       );
-     384             :     }
-     385             : 
-     386             :     try {
-     387           0 :       await CameraPlatform.instance.startVideoRecording(_cameraId);
-     388           0 :       value = value.copyWith(isRecordingVideo: true, isRecordingPaused: false);
-     389           0 :     } on PlatformException catch (e) {
-     390           0 :       throw CameraException(e.code, e.message);
-     391             :     }
-     392             :   }
-     393             : 
-     394             :   /// Stops the video recording and returns the file where it was saved.
-     395             :   ///
-     396             :   /// Throws a [CameraException] if the capture failed.
-     397           0 :   Future<XFile> stopVideoRecording() async {
-     398           0 :     if (!value.isInitialized || _isDisposed) {
-     399           0 :       throw CameraException(
-     400             :         'Uninitialized CameraController',
-     401             :         'stopVideoRecording was called on uninitialized CameraController',
-     402             :       );
-     403             :     }
-     404           0 :     if (!value.isRecordingVideo) {
-     405           0 :       throw CameraException(
-     406             :         'No video is recording',
-     407             :         'stopVideoRecording was called when no video is recording.',
-     408             :       );
-     409             :     }
-     410             :     try {
-     411           0 :       XFile file = await CameraPlatform.instance.stopVideoRecording(_cameraId);
-     412           0 :       value = value.copyWith(isRecordingVideo: false);
-     413             :       return file;
-     414           0 :     } on PlatformException catch (e) {
-     415           0 :       throw CameraException(e.code, e.message);
-     416             :     }
-     417             :   }
-     418             : 
-     419             :   /// Pause video recording.
-     420             :   ///
-     421             :   /// This feature is only available on iOS and Android sdk 24+.
-     422           0 :   Future<void> pauseVideoRecording() async {
-     423           0 :     if (!value.isInitialized || _isDisposed) {
-     424           0 :       throw CameraException(
-     425             :         'Uninitialized CameraController',
-     426             :         'pauseVideoRecording was called on uninitialized CameraController',
-     427             :       );
-     428             :     }
-     429           0 :     if (!value.isRecordingVideo) {
-     430           0 :       throw CameraException(
-     431             :         'No video is recording',
-     432             :         'pauseVideoRecording was called when no video is recording.',
-     433             :       );
-     434             :     }
-     435             :     try {
-     436           0 :       await CameraPlatform.instance.pauseVideoRecording(_cameraId);
-     437           0 :       value = value.copyWith(isRecordingPaused: true);
-     438           0 :     } on PlatformException catch (e) {
-     439           0 :       throw CameraException(e.code, e.message);
-     440             :     }
-     441             :   }
-     442             : 
-     443             :   /// Resume video recording after pausing.
-     444             :   ///
-     445             :   /// This feature is only available on iOS and Android sdk 24+.
-     446           0 :   Future<void> resumeVideoRecording() async {
-     447           0 :     if (!value.isInitialized || _isDisposed) {
-     448           0 :       throw CameraException(
-     449             :         'Uninitialized CameraController',
-     450             :         'resumeVideoRecording was called on uninitialized CameraController',
-     451             :       );
-     452             :     }
-     453           0 :     if (!value.isRecordingVideo) {
-     454           0 :       throw CameraException(
-     455             :         'No video is recording',
-     456             :         'resumeVideoRecording was called when no video is recording.',
-     457             :       );
-     458             :     }
-     459             :     try {
-     460           0 :       await CameraPlatform.instance.resumeVideoRecording(_cameraId);
-     461           0 :       value = value.copyWith(isRecordingPaused: false);
-     462           0 :     } on PlatformException catch (e) {
-     463           0 :       throw CameraException(e.code, e.message);
-     464             :     }
-     465             :   }
-     466             : 
-     467             :   /// Returns a widget showing a live camera preview.
-     468           0 :   Widget buildPreview() {
-     469           0 :     if (!value.isInitialized || _isDisposed) {
-     470           0 :       throw CameraException(
-     471             :         'Uninitialized CameraController',
-     472             :         'buildView() was called on uninitialized CameraController.',
-     473             :       );
-     474             :     }
-     475             :     try {
-     476           0 :       return CameraPlatform.instance.buildPreview(_cameraId);
-     477           0 :     } on PlatformException catch (e) {
-     478           0 :       throw CameraException(e.code, e.message);
-     479             :     }
-     480             :   }
-     481             : 
-     482             :   /// Releases the resources of this camera.
-     483             :   @override
-     484           1 :   Future<void> dispose() async {
-     485           1 :     if (_isDisposed) {
-     486             :       return;
-     487             :     }
-     488           1 :     _isDisposed = true;
-     489           1 :     super.dispose();
-     490           1 :     if (_initCalled != null) {
-     491           2 :       await _initCalled;
-     492           4 :       await CameraPlatform.instance.dispose(_cameraId);
-     493             :     }
-     494             :   }
-     495             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/camera_image.dart.func-sort-c.html b/packages/camera/camera/coverage/html/src/camera_image.dart.func-sort-c.html deleted file mode 100644 index fefdd9fed353..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_image.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_image.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_image.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:242596.0 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/camera_image.dart.func.html b/packages/camera/camera/coverage/html/src/camera_image.dart.func.html deleted file mode 100644 index 511bf58dbbca..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_image.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_image.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_image.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:242596.0 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/camera_image.dart.gcov.html b/packages/camera/camera/coverage/html/src/camera_image.dart.gcov.html deleted file mode 100644 index e656f3582c13..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_image.dart.gcov.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_image.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_image.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:242596.0 %
Date:2020-12-22 12:19:05Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : import 'dart:typed_data';
-       6             : 
-       7             : import 'package:flutter/foundation.dart';
-       8             : import 'package:flutter/material.dart';
-       9             : 
-      10             : /// A single color plane of image data.
-      11             : ///
-      12             : /// The number and meaning of the planes in an image are determined by the
-      13             : /// format of the Image.
-      14             : class Plane {
-      15           1 :   Plane._fromPlatformData(Map<dynamic, dynamic> data)
-      16           1 :       : bytes = data['bytes'],
-      17           1 :         bytesPerPixel = data['bytesPerPixel'],
-      18           1 :         bytesPerRow = data['bytesPerRow'],
-      19           1 :         height = data['height'],
-      20           1 :         width = data['width'];
-      21             : 
-      22             :   /// Bytes representing this plane.
-      23             :   final Uint8List bytes;
-      24             : 
-      25             :   /// The distance between adjacent pixel samples on Android, in bytes.
-      26             :   ///
-      27             :   /// Will be `null` on iOS.
-      28             :   final int bytesPerPixel;
-      29             : 
-      30             :   /// The row stride for this color plane, in bytes.
-      31             :   final int bytesPerRow;
-      32             : 
-      33             :   /// Height of the pixel buffer on iOS.
-      34             :   ///
-      35             :   /// Will be `null` on Android
-      36             :   final int height;
-      37             : 
-      38             :   /// Width of the pixel buffer on iOS.
-      39             :   ///
-      40             :   /// Will be `null` on Android.
-      41             :   final int width;
-      42             : }
-      43             : 
-      44             : // TODO:(bmparr) Turn [ImageFormatGroup] to a class with int values.
-      45             : /// Group of image formats that are comparable across Android and iOS platforms.
-      46           4 : enum ImageFormatGroup {
-      47             :   /// The image format does not fit into any specific group.
-      48           4 :   unknown,
-      49             : 
-      50             :   /// Multi-plane YUV 420 format.
-      51             :   ///
-      52             :   /// This format is a generic YCbCr format, capable of describing any 4:2:0
-      53             :   /// chroma-subsampled planar or semiplanar buffer (but not fully interleaved),
-      54             :   /// with 8 bits per color sample.
-      55             :   ///
-      56             :   /// On Android, this is `android.graphics.ImageFormat.YUV_420_888`. See
-      57             :   /// https://developer.android.com/reference/android/graphics/ImageFormat.html#YUV_420_888
-      58             :   ///
-      59             :   /// On iOS, this is `kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange`. See
-      60             :   /// https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_420ypcbcr8biplanarvideorange?language=objc
-      61           4 :   yuv420,
-      62             : 
-      63             :   /// 32-bit BGRA.
-      64             :   ///
-      65             :   /// On iOS, this is `kCVPixelFormatType_32BGRA`. See
-      66             :   /// https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_32bgra?language=objc
-      67           4 :   bgra8888,
-      68             : 
-      69             :   /// 32-big RGB image encoded into JPEG bytes.
-      70             :   ///
-      71             :   /// On Android, this is `android.graphics.ImageFormat.JPEG`. See
-      72             :   /// https://developer.android.com/reference/android/graphics/ImageFormat#JPEG
-      73           4 :   jpeg,
-      74             : }
-      75             : 
-      76             : /// Describes how pixels are represented in an image.
-      77             : class ImageFormat {
-      78           2 :   ImageFormat._fromPlatformData(this.raw) : group = _asImageFormatGroup(raw);
-      79             : 
-      80             :   /// Describes the format group the raw image format falls into.
-      81             :   final ImageFormatGroup group;
-      82             : 
-      83             :   /// Raw version of the format from the Android or iOS platform.
-      84             :   ///
-      85             :   /// On Android, this is an `int` from class `android.graphics.ImageFormat`. See
-      86             :   /// https://developer.android.com/reference/android/graphics/ImageFormat
-      87             :   ///
-      88             :   /// On iOS, this is a `FourCharCode` constant from Pixel Format Identifiers.
-      89             :   /// See https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers?language=objc
-      90             :   final dynamic raw;
-      91             : }
-      92             : 
-      93           1 : ImageFormatGroup _asImageFormatGroup(dynamic rawFormat) {
-      94           2 :   if (defaultTargetPlatform == TargetPlatform.android) {
-      95             :     switch (rawFormat) {
-      96             :     // android.graphics.ImageFormat.YUV_420_888
-      97           1 :       case 35:
-      98             :         return ImageFormatGroup.yuv420;
-      99             :     // android.graphics.ImageFormat.JPEG
-     100           0 :       case 256:
-     101             :         return ImageFormatGroup.jpeg;
-     102             :     }
-     103             :   }
-     104             : 
-     105           2 :   if (defaultTargetPlatform == TargetPlatform.iOS) {
-     106             :     switch (rawFormat) {
-     107             :       // kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
-     108           1 :       case 875704438:
-     109             :         return ImageFormatGroup.yuv420;
-     110             :       // kCVPixelFormatType_32BGRA
-     111           1 :       case 1111970369:
-     112             :         return ImageFormatGroup.bgra8888;
-     113             :     }
-     114             :   }
-     115             : 
-     116             :   return ImageFormatGroup.unknown;
-     117             : }
-     118             : 
-     119             : /// A single complete image buffer from the platform camera.
-     120             : ///
-     121             : /// This class allows for direct application access to the pixel data of an
-     122             : /// Image through one or more [Uint8List]. Each buffer is encapsulated in a
-     123             : /// [Plane] that describes the layout of the pixel data in that plane. The
-     124             : /// [CameraImage] is not directly usable as a UI resource.
-     125             : ///
-     126             : /// Although not all image formats are planar on iOS, we treat 1-dimensional
-     127             : /// images as single planar images.
-     128             : class CameraImage {
-     129             :   /// CameraImage Constructor
-     130           1 :   CameraImage.fromPlatformData(Map<dynamic, dynamic> data)
-     131           2 :       : format = ImageFormat._fromPlatformData(data['format']),
-     132           1 :         height = data['height'],
-     133           1 :         width = data['width'],
-     134           2 :         planes = List<Plane>.unmodifiable(data['planes']
-     135           3 :             .map((dynamic planeData) => Plane._fromPlatformData(planeData)));
-     136             : 
-     137             :   /// Format of the image provided.
-     138             :   ///
-     139             :   /// Determines the number of planes needed to represent the image, and
-     140             :   /// the general layout of the pixel data in each [Uint8List].
-     141             :   final ImageFormat format;
-     142             : 
-     143             :   /// Height of the image in pixels.
-     144             :   ///
-     145             :   /// For formats where some color channels are subsampled, this is the height
-     146             :   /// of the largest-resolution plane.
-     147             :   final int height;
-     148             : 
-     149             :   /// Width of the image in pixels.
-     150             :   ///
-     151             :   /// For formats where some color channels are subsampled, this is the width
-     152             :   /// of the largest-resolution plane.
-     153             :   final int width;
-     154             : 
-     155             :   /// The pixels planes for this image.
-     156             :   ///
-     157             :   /// The number of planes is determined by the format of the image.
-     158             :   final List<Plane> planes;
-     159             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/camera_preview.dart.func-sort-c.html b/packages/camera/camera/coverage/html/src/camera_preview.dart.func-sort-c.html deleted file mode 100644 index c7055370b284..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_preview.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_preview.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_preview.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:050.0 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/camera_preview.dart.func.html b/packages/camera/camera/coverage/html/src/camera_preview.dart.func.html deleted file mode 100644 index c07db81fc4a5..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_preview.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_preview.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_preview.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:050.0 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/camera_preview.dart.gcov.html b/packages/camera/camera/coverage/html/src/camera_preview.dart.gcov.html deleted file mode 100644 index 2ebf3a14f177..000000000000 --- a/packages/camera/camera/coverage/html/src/camera_preview.dart.gcov.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - LCOV - lcov.info - src/camera_preview.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - src - camera_preview.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:050.0 %
Date:2020-12-22 12:19:05Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : import 'package:camera/camera.dart';
-       6             : import 'package:camera_platform_interface/camera_platform_interface.dart';
-       7             : import 'package:flutter/material.dart';
-       8             : 
-       9             : /// A widget showing a live camera preview.
-      10             : class CameraPreview extends StatelessWidget {
-      11             :   /// Creates a preview widget for the given camera controller.
-      12           0 :   const CameraPreview(this.controller);
-      13             : 
-      14             :   /// The controller for the camera that the preview is shown for.
-      15             :   final CameraController controller;
-      16             : 
-      17           0 :   @override
-      18             :   Widget build(BuildContext context) {
-      19           0 :     return controller.value.isInitialized
-      20           0 :         ? CameraPlatform.instance.buildPreview(controller.cameraId)
-      21           0 :         : Container();
-      22             :   }
-      23             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/index-sort-f.html b/packages/camera/camera/coverage/html/src/index-sort-f.html deleted file mode 100644 index deb29d38b329..000000000000 --- a/packages/camera/camera/coverage/html/src/index-sort-f.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - LCOV - lcov.info - src - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - srcHitTotalCoverage
Test:lcov.infoLines:12117569.1 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_controller.dart -
66.9%66.9%
-
66.9 %97 / 145-0 / 0
camera_image.dart -
96.0%96.0%
-
96.0 %24 / 25-0 / 0
camera_preview.dart -
0.0%
-
0.0 %0 / 5-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/index-sort-l.html b/packages/camera/camera/coverage/html/src/index-sort-l.html deleted file mode 100644 index 0d181ec8c267..000000000000 --- a/packages/camera/camera/coverage/html/src/index-sort-l.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - LCOV - lcov.info - src - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - srcHitTotalCoverage
Test:lcov.infoLines:12117569.1 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_preview.dart -
0.0%
-
0.0 %0 / 5-0 / 0
camera_controller.dart -
66.9%66.9%
-
66.9 %97 / 145-0 / 0
camera_image.dart -
96.0%96.0%
-
96.0 %24 / 25-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/src/index.html b/packages/camera/camera/coverage/html/src/index.html deleted file mode 100644 index a1ee5b00c3c2..000000000000 --- a/packages/camera/camera/coverage/html/src/index.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - LCOV - lcov.info - src - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - srcHitTotalCoverage
Test:lcov.infoLines:12117569.1 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_controller.dart -
66.9%66.9%
-
66.9 %97 / 145-0 / 0
camera_image.dart -
96.0%96.0%
-
96.0 %24 / 25-0 / 0
camera_preview.dart -
0.0%
-
0.0 %0 / 5-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/updown.png b/packages/camera/camera/coverage/html/updown.png deleted file mode 100644 index aa56a238b3e6c435265250f9266cd1b8caba0f20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`*?77*hG?8mPH5^{)z4*}Q$iB}huR`+ diff --git a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func-sort-c.html b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func-sort-c.html deleted file mode 100644 index 04d7f26df83c..000000000000 --- a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/image_format_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - image_format_utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func.html b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func.html deleted file mode 100644 index 956628711a03..000000000000 --- a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/image_format_utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - image_format_utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.gcov.html b/packages/camera/camera/coverage/html/utils/image_format_utils.dart.gcov.html deleted file mode 100644 index bdc6a0cd7464..000000000000 --- a/packages/camera/camera/coverage/html/utils/image_format_utils.dart.gcov.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/image_format_utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - image_format_utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : import 'package:flutter/foundation.dart';
-       2             : 
-       3             : import '../camera.dart';
-       4             : 
-       5             : /// Converts [ImageFormatGroup] to integer definition of the raw format
-       6           2 : int imageFormatGroupAsIntegerValue(ImageFormatGroup imageFormatGroup) {
-       7           4 :   if (defaultTargetPlatform == TargetPlatform.iOS) {
-       8             :     switch (imageFormatGroup) {
-       9             :     // kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
-      10           0 :       case ImageFormatGroup.yuv420:
-      11             :         return 875704438;
-      12             :     // kCVPixelFormatType_32BGRA
-      13           0 :       case ImageFormatGroup.bgra8888:
-      14             :         return 1111970369;
-      15           0 :       case ImageFormatGroup.jpeg:
-      16           0 :       case ImageFormatGroup.unknown:
-      17             :         return 0;
-      18             :     }
-      19           4 :   } else if (defaultTargetPlatform == TargetPlatform.android) {
-      20             :     switch (imageFormatGroup) {
-      21             :     // kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
-      22           2 :       case ImageFormatGroup.yuv420:
-      23             :         return 35;
-      24             :     // kCVPixelFormatType_32BGRA
-      25           2 :       case ImageFormatGroup.bgra8888:
-      26           2 :       case ImageFormatGroup.unknown:
-      27             :         return 0;
-      28           2 :       case ImageFormatGroup.jpeg:
-      29             :         return 256;
-      30             :     }
-      31             :   }
-      32             :   // unknown ImageFormatGroup or unsupported platform
-      33             :   return 0;
-      34             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/utils/index-sort-f.html b/packages/camera/camera/coverage/html/utils/index-sort-f.html deleted file mode 100644 index 99b8bf36fba2..000000000000 --- a/packages/camera/camera/coverage/html/utils/index-sort-f.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
image_format_utils.dart -
63.6%63.6%
-
63.6 %7 / 11-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/utils/index-sort-l.html b/packages/camera/camera/coverage/html/utils/index-sort-l.html deleted file mode 100644 index ca0a452dbdbc..000000000000 --- a/packages/camera/camera/coverage/html/utils/index-sort-l.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
image_format_utils.dart -
63.6%63.6%
-
63.6 %7 / 11-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/html/utils/index.html b/packages/camera/camera/coverage/html/utils/index.html deleted file mode 100644 index dda2e0cb3f35..000000000000 --- a/packages/camera/camera/coverage/html/utils/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:71163.6 %
Date:2020-12-22 12:19:05Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
image_format_utils.dart -
63.6%63.6%
-
63.6 %7 / 11-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera/coverage/lcov.info b/packages/camera/camera/coverage/lcov.info deleted file mode 100644 index 01f6f5977837..000000000000 --- a/packages/camera/camera/coverage/lcov.info +++ /dev/null @@ -1,202 +0,0 @@ -SF:lib/src/camera_controller.dart -DA:15,2 -DA:26,1 -DA:27,2 -DA:33,3 -DA:44,0 -DA:45,0 -DA:68,2 -DA:84,12 -DA:89,2 -DA:95,3 -DA:104,3 -DA:105,3 -DA:107,3 -DA:108,3 -DA:109,3 -DA:110,3 -DA:111,3 -DA:115,1 -DA:117,2 -DA:118,1 -DA:119,1 -DA:120,1 -DA:121,1 -DA:122,1 -DA:135,2 -DA:140,2 -DA:169,1 -DA:170,1 -DA:174,0 -DA:179,2 -DA:180,2 -DA:181,1 -DA:187,8 -DA:188,2 -DA:189,2 -DA:190,2 -DA:194,10 -DA:195,2 -DA:196,2 -DA:197,2 -DA:199,2 -DA:201,6 -DA:202,2 -DA:203,4 -DA:206,6 -DA:208,2 -DA:210,1 -DA:211,3 -DA:214,2 -DA:228,1 -DA:229,3 -DA:241,1 -DA:242,3 -DA:243,1 -DA:248,2 -DA:249,1 -DA:255,3 -DA:256,4 -DA:257,3 -DA:259,1 -DA:260,3 -DA:261,3 -DA:282,1 -DA:283,2 -DA:284,0 -DA:286,3 -DA:287,1 -DA:292,2 -DA:293,1 -DA:298,2 -DA:299,1 -DA:306,3 -DA:307,3 -DA:308,0 -DA:309,0 -DA:313,1 -DA:314,2 -DA:315,0 -DA:316,0 -DA:328,1 -DA:329,2 -DA:330,0 -DA:332,3 -DA:333,1 -DA:338,2 -DA:339,1 -DA:344,2 -DA:345,1 -DA:352,3 -DA:353,3 -DA:354,0 -DA:355,0 -DA:358,3 -DA:359,1 -DA:366,1 -DA:367,3 -DA:368,1 -DA:373,2 -DA:374,1 -DA:379,2 -DA:380,1 -DA:387,0 -DA:388,0 -DA:389,0 -DA:390,0 -DA:397,0 -DA:398,0 -DA:399,0 -DA:404,0 -DA:405,0 -DA:411,0 -DA:412,0 -DA:414,0 -DA:415,0 -DA:422,0 -DA:423,0 -DA:424,0 -DA:429,0 -DA:430,0 -DA:436,0 -DA:437,0 -DA:438,0 -DA:439,0 -DA:446,0 -DA:447,0 -DA:448,0 -DA:453,0 -DA:454,0 -DA:460,0 -DA:461,0 -DA:462,0 -DA:463,0 -DA:468,0 -DA:469,0 -DA:470,0 -DA:476,0 -DA:477,0 -DA:478,0 -DA:484,1 -DA:485,1 -DA:488,1 -DA:489,1 -DA:490,1 -DA:491,2 -DA:492,4 -LF:145 -LH:97 -end_of_record -SF:lib/src/camera_image.dart -DA:15,1 -DA:16,1 -DA:17,1 -DA:18,1 -DA:19,1 -DA:20,1 -DA:46,4 -DA:48,4 -DA:61,4 -DA:67,4 -DA:73,4 -DA:78,2 -DA:93,1 -DA:94,2 -DA:97,1 -DA:100,0 -DA:105,2 -DA:108,1 -DA:111,1 -DA:130,1 -DA:131,2 -DA:132,1 -DA:133,1 -DA:134,2 -DA:135,3 -LF:25 -LH:24 -end_of_record -SF:lib/src/camera_preview.dart -DA:12,0 -DA:17,0 -DA:19,0 -DA:20,0 -DA:21,0 -LF:5 -LH:0 -end_of_record -SF:lib/utils/image_format_utils.dart -DA:6,2 -DA:7,4 -DA:10,0 -DA:13,0 -DA:15,0 -DA:16,0 -DA:19,4 -DA:22,2 -DA:25,2 -DA:26,2 -DA:28,2 -LF:11 -LH:7 -end_of_record diff --git a/packages/camera/camera_platform_interface/coverage/html/amber.png b/packages/camera/camera_platform_interface/coverage/html/amber.png deleted file mode 100644 index 2cab170d8359081983a4e343848dfe06bc490f12..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^G2tW}LqE04T&+ z;1OBOz`!j8!i<;h*8KqrvZOouIx;Y9?C1WI$O`1M1^9%x{(levWG?NMQuI!iC1^Jb!lvI6;R0X`wF(yt=9xVZRt1vCRixIA4P dLn>}1Cji+@42)0J?}79&c)I$ztaD0e0sy@GAL0N2 diff --git a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func-sort-c.html deleted file mode 100644 index 4652b3310893..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - events/camera_event.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - events - camera_event.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func.html deleted file mode 100644 index a65e45c8e004..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - events/camera_event.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - events - camera_event.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.gcov.html deleted file mode 100644 index fdd195c34b27..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/events/camera_event.dart.gcov.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - LCOV - lcov.info - events/camera_event.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - events - camera_event.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2019 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : /// Generic Event coming from the native side of Camera.
-       6             : ///
-       7             : /// All [CameraEvent]s contain the `cameraId` that originated the event. This
-       8             : /// should never be `null`.
-       9             : ///
-      10             : /// This class is used as a base class for all the events that might be
-      11             : /// triggered from a Camera, but it is never used directly as an event type.
-      12             : ///
-      13             : /// Do NOT instantiate new events like `CameraEvent(cameraId)` directly,
-      14             : /// use a specific class instead:
-      15             : ///
-      16             : /// Do `class NewEvent extend CameraEvent` when creating your own events.
-      17             : /// See below for examples: `CameraClosingEvent`, `CameraErrorEvent`...
-      18             : /// These events are more semantic and more pleasant to use than raw generics.
-      19             : /// They can be (and in fact, are) filtered by the `instanceof`-operator.
-      20             : abstract class CameraEvent {
-      21             :   /// The ID of the Camera this event is associated to.
-      22             :   final int cameraId;
-      23             : 
-      24             :   /// Build a Camera Event, that relates a `cameraId`.
-      25             :   ///
-      26             :   /// The `cameraId` is the ID of the camera that triggered the event.
-      27           2 :   CameraEvent(this.cameraId) : assert(cameraId != null);
-      28             : 
-      29           2 :   @override
-      30             :   bool operator ==(Object other) =>
-      31             :       identical(this, other) ||
-      32           2 :       other is CameraEvent &&
-      33           6 :           runtimeType == other.runtimeType &&
-      34           6 :           cameraId == other.cameraId;
-      35             : 
-      36           1 :   @override
-      37           2 :   int get hashCode => cameraId.hashCode;
-      38             : }
-      39             : 
-      40             : /// An event fired when the camera has finished initializing.
-      41             : class CameraInitializedEvent extends CameraEvent {
-      42             :   /// The width of the preview in pixels.
-      43             :   final double previewWidth;
-      44             : 
-      45             :   /// The height of the preview in pixels.
-      46             :   final double previewHeight;
-      47             : 
-      48             :   /// Build a CameraInitialized event triggered from the camera represented by
-      49             :   /// `cameraId`.
-      50             :   ///
-      51             :   /// The `previewWidth` represents the width of the generated preview in pixels.
-      52             :   /// The `previewHeight` represents the height of the generated preview in pixels.
-      53           2 :   CameraInitializedEvent(
-      54             :     int cameraId,
-      55             :     this.previewWidth,
-      56             :     this.previewHeight,
-      57           2 :   ) : super(cameraId);
-      58             : 
-      59             :   /// Converts the supplied [Map] to an instance of the [CameraInitializedEvent]
-      60             :   /// class.
-      61           1 :   CameraInitializedEvent.fromJson(Map<String, dynamic> json)
-      62           1 :       : previewWidth = json['previewWidth'],
-      63           1 :         previewHeight = json['previewHeight'],
-      64           2 :         super(json['cameraId']);
-      65             : 
-      66             :   /// Converts the [CameraInitializedEvent] instance into a [Map] instance that
-      67             :   /// can be serialized to JSON.
-      68           4 :   Map<String, dynamic> toJson() => {
-      69           2 :         'cameraId': cameraId,
-      70           2 :         'previewWidth': previewWidth,
-      71           2 :         'previewHeight': previewHeight,
-      72             :       };
-      73             : 
-      74           2 :   @override
-      75             :   bool operator ==(Object other) =>
-      76             :       identical(this, other) ||
-      77           2 :       super == other &&
-      78           2 :           other is CameraInitializedEvent &&
-      79           6 :           runtimeType == other.runtimeType &&
-      80           6 :           previewWidth == other.previewWidth &&
-      81           6 :           previewHeight == other.previewHeight;
-      82             : 
-      83           1 :   @override
-      84             :   int get hashCode =>
-      85           7 :       super.hashCode ^ previewWidth.hashCode ^ previewHeight.hashCode;
-      86             : }
-      87             : 
-      88             : /// An event fired when the resolution preset of the camera has changed.
-      89             : class CameraResolutionChangedEvent extends CameraEvent {
-      90             :   /// The capture width in pixels.
-      91             :   final double captureWidth;
-      92             : 
-      93             :   /// The capture height in pixels.
-      94             :   final double captureHeight;
-      95             : 
-      96             :   /// Build a CameraResolutionChanged event triggered from the camera
-      97             :   /// represented by `cameraId`.
-      98             :   ///
-      99             :   /// The `captureWidth` represents the width of the resulting image in pixels.
-     100             :   /// The `captureHeight` represents the height of the resulting image in pixels.
-     101           2 :   CameraResolutionChangedEvent(
-     102             :     int cameraId,
-     103             :     this.captureWidth,
-     104             :     this.captureHeight,
-     105           2 :   ) : super(cameraId);
-     106             : 
-     107             :   /// Converts the supplied [Map] to an instance of the
-     108             :   /// [CameraResolutionChangedEvent] class.
-     109           1 :   CameraResolutionChangedEvent.fromJson(Map<String, dynamic> json)
-     110           1 :       : captureWidth = json['captureWidth'],
-     111           1 :         captureHeight = json['captureHeight'],
-     112           2 :         super(json['cameraId']);
-     113             : 
-     114             :   /// Converts the [CameraResolutionChangedEvent] instance into a [Map] instance
-     115             :   /// that can be serialized to JSON.
-     116           4 :   Map<String, dynamic> toJson() => {
-     117           2 :         'cameraId': cameraId,
-     118           2 :         'captureWidth': captureWidth,
-     119           2 :         'captureHeight': captureHeight,
-     120             :       };
-     121             : 
-     122           2 :   @override
-     123             :   bool operator ==(Object other) =>
-     124             :       identical(this, other) ||
-     125           2 :       other is CameraResolutionChangedEvent &&
-     126           2 :           super == (other) &&
-     127           6 :           runtimeType == other.runtimeType &&
-     128           6 :           captureWidth == other.captureWidth &&
-     129           6 :           captureHeight == other.captureHeight;
-     130             : 
-     131           1 :   @override
-     132             :   int get hashCode =>
-     133           7 :       super.hashCode ^ captureWidth.hashCode ^ captureHeight.hashCode;
-     134             : }
-     135             : 
-     136             : /// An event fired when the camera is going to close.
-     137             : class CameraClosingEvent extends CameraEvent {
-     138             :   /// Build a CameraClosing event triggered from the camera represented by
-     139             :   /// `cameraId`.
-     140           4 :   CameraClosingEvent(int cameraId) : super(cameraId);
-     141             : 
-     142             :   /// Converts the supplied [Map] to an instance of the [CameraClosingEvent]
-     143             :   /// class.
-     144           1 :   CameraClosingEvent.fromJson(Map<String, dynamic> json)
-     145           2 :       : super(json['cameraId']);
-     146             : 
-     147             :   /// Converts the [CameraClosingEvent] instance into a [Map] instance that can
-     148             :   /// be serialized to JSON.
-     149           4 :   Map<String, dynamic> toJson() => {
-     150           2 :         'cameraId': cameraId,
-     151             :       };
-     152             : 
-     153           2 :   @override
-     154             :   bool operator ==(Object other) =>
-     155             :       identical(this, other) ||
-     156           2 :       super == (other) &&
-     157           2 :           other is CameraClosingEvent &&
-     158           6 :           runtimeType == other.runtimeType;
-     159             : 
-     160           1 :   @override
-     161           1 :   int get hashCode => super.hashCode;
-     162             : }
-     163             : 
-     164             : /// An event fired when an error occured while operating the camera.
-     165             : class CameraErrorEvent extends CameraEvent {
-     166             :   /// Description of the error.
-     167             :   final String description;
-     168             : 
-     169             :   /// Build a CameraError event triggered from the camera represented by
-     170             :   /// `cameraId`.
-     171             :   ///
-     172             :   /// The `description` represents the error occured on the camera.
-     173           4 :   CameraErrorEvent(int cameraId, this.description) : super(cameraId);
-     174             : 
-     175             :   /// Converts the supplied [Map] to an instance of the [CameraErrorEvent]
-     176             :   /// class.
-     177           1 :   CameraErrorEvent.fromJson(Map<String, dynamic> json)
-     178           1 :       : description = json['description'],
-     179           2 :         super(json['cameraId']);
-     180             : 
-     181             :   /// Converts the [CameraErrorEvent] instance into a [Map] instance that can be
-     182             :   /// serialized to JSON.
-     183           4 :   Map<String, dynamic> toJson() => {
-     184           2 :         'cameraId': cameraId,
-     185           2 :         'description': description,
-     186             :       };
-     187             : 
-     188           2 :   @override
-     189             :   bool operator ==(Object other) =>
-     190             :       identical(this, other) ||
-     191           2 :       super == (other) &&
-     192           2 :           other is CameraErrorEvent &&
-     193           6 :           runtimeType == other.runtimeType &&
-     194           6 :           description == other.description;
-     195             : 
-     196           1 :   @override
-     197           4 :   int get hashCode => super.hashCode ^ description.hashCode;
-     198             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/events/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/events/index-sort-f.html deleted file mode 100644 index 6a31953491ea..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/events/index-sort-f.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - events - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - eventsHitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_event.dart -
100.0%
-
100.0 %68 / 68-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/events/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/events/index-sort-l.html deleted file mode 100644 index 0ef6d55f8895..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/events/index-sort-l.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - events - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - eventsHitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_event.dart -
100.0%
-
100.0 %68 / 68-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/events/index.html b/packages/camera/camera_platform_interface/coverage/html/events/index.html deleted file mode 100644 index a71f1bb81549..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/events/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - events - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - eventsHitTotalCoverage
Test:lcov.infoLines:6868100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_event.dart -
100.0%
-
100.0 %68 / 68-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/gcov.css b/packages/camera/camera_platform_interface/coverage/html/gcov.css deleted file mode 100644 index bfd0a83e10b5..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/gcov.css +++ /dev/null @@ -1,519 +0,0 @@ -/* All views: initial background and text color */ -body -{ - color: #000000; - background-color: #FFFFFF; -} - -/* All views: standard link format*/ -a:link -{ - color: #284FA8; - text-decoration: underline; -} - -/* All views: standard link - visited format */ -a:visited -{ - color: #00CB40; - text-decoration: underline; -} - -/* All views: standard link - activated format */ -a:active -{ - color: #FF0040; - text-decoration: underline; -} - -/* All views: main title format */ -td.title -{ - text-align: center; - padding-bottom: 10px; - font-family: sans-serif; - font-size: 20pt; - font-style: italic; - font-weight: bold; -} - -/* All views: header item format */ -td.headerItem -{ - text-align: right; - padding-right: 6px; - font-family: sans-serif; - font-weight: bold; - vertical-align: top; - white-space: nowrap; -} - -/* All views: header item value format */ -td.headerValue -{ - text-align: left; - color: #284FA8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; -} - -/* All views: header item coverage table heading */ -td.headerCovTableHead -{ - text-align: center; - padding-right: 6px; - padding-left: 6px; - padding-bottom: 0px; - font-family: sans-serif; - font-size: 80%; - white-space: nowrap; -} - -/* All views: header item coverage table entry */ -td.headerCovTableEntry -{ - text-align: right; - color: #284FA8; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #DAE7FE; -} - -/* All views: header item coverage table entry for high coverage rate */ -td.headerCovTableEntryHi -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #A7FC9D; -} - -/* All views: header item coverage table entry for medium coverage rate */ -td.headerCovTableEntryMed -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #FFEA20; -} - -/* All views: header item coverage table entry for ow coverage rate */ -td.headerCovTableEntryLo -{ - text-align: right; - color: #000000; - font-family: sans-serif; - font-weight: bold; - white-space: nowrap; - padding-left: 12px; - padding-right: 4px; - background-color: #FF0000; -} - -/* All views: header legend value for legend entry */ -td.headerValueLeg -{ - text-align: left; - color: #000000; - font-family: sans-serif; - font-size: 80%; - white-space: nowrap; - padding-top: 4px; -} - -/* All views: color of horizontal ruler */ -td.ruler -{ - background-color: #6688D4; -} - -/* All views: version string format */ -td.versionInfo -{ - text-align: center; - padding-top: 2px; - font-family: sans-serif; - font-style: italic; -} - -/* Directory view/File view (all)/Test case descriptions: - table headline format */ -td.tableHead -{ - text-align: center; - color: #FFFFFF; - background-color: #6688D4; - font-family: sans-serif; - font-size: 120%; - font-weight: bold; - white-space: nowrap; - padding-left: 4px; - padding-right: 4px; -} - -span.tableHeadSort -{ - padding-right: 4px; -} - -/* Directory view/File view (all): filename entry format */ -td.coverFile -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284FA8; - background-color: #DAE7FE; - font-family: monospace; -} - -/* Directory view/File view (all): bar-graph entry format*/ -td.coverBar -{ - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; -} - -/* Directory view/File view (all): bar-graph outline color */ -td.coverBarOutline -{ - background-color: #000000; -} - -/* Directory view/File view (all): percentage entry for files with - high coverage rate */ -td.coverPerHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #A7FC9D; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - high coverage rate */ -td.coverNumHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #A7FC9D; - white-space: nowrap; - font-family: sans-serif; -} - -/* Directory view/File view (all): percentage entry for files with - medium coverage rate */ -td.coverPerMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FFEA20; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - medium coverage rate */ -td.coverNumMed -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FFEA20; - white-space: nowrap; - font-family: sans-serif; -} - -/* Directory view/File view (all): percentage entry for files with - low coverage rate */ -td.coverPerLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - font-weight: bold; - font-family: sans-serif; -} - -/* Directory view/File view (all): line count entry for files with - low coverage rate */ -td.coverNumLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - white-space: nowrap; - font-family: sans-serif; -} - -/* File view (all): "show/hide details" link format */ -a.detail:link -{ - color: #B8D0FF; - font-size:80%; -} - -/* File view (all): "show/hide details" link - visited format */ -a.detail:visited -{ - color: #B8D0FF; - font-size:80%; -} - -/* File view (all): "show/hide details" link - activated format */ -a.detail:active -{ - color: #FFFFFF; - font-size:80%; -} - -/* File view (detail): test name entry */ -td.testName -{ - text-align: right; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; -} - -/* File view (detail): test percentage entry */ -td.testPer -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; -} - -/* File view (detail): test lines count entry */ -td.testNum -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-family: sans-serif; -} - -/* Test case descriptions: test name format*/ -dt -{ - font-family: sans-serif; - font-weight: bold; -} - -/* Test case descriptions: description table body */ -td.testDescription -{ - padding-top: 10px; - padding-left: 30px; - padding-bottom: 10px; - padding-right: 30px; - background-color: #DAE7FE; -} - -/* Source code view: function entry */ -td.coverFn -{ - text-align: left; - padding-left: 10px; - padding-right: 20px; - color: #284FA8; - background-color: #DAE7FE; - font-family: monospace; -} - -/* Source code view: function entry zero count*/ -td.coverFnLo -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #FF0000; - font-weight: bold; - font-family: sans-serif; -} - -/* Source code view: function entry nonzero count*/ -td.coverFnHi -{ - text-align: right; - padding-left: 10px; - padding-right: 10px; - background-color: #DAE7FE; - font-weight: bold; - font-family: sans-serif; -} - -/* Source code view: source code format */ -pre.source -{ - font-family: monospace; - white-space: pre; - margin-top: 2px; -} - -/* Source code view: line number format */ -span.lineNum -{ - background-color: #EFE383; -} - -/* Source code view: format for lines which were executed */ -td.lineCov, -span.lineCov -{ - background-color: #CAD7FE; -} - -/* Source code view: format for Cov legend */ -span.coverLegendCov -{ - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #CAD7FE; -} - -/* Source code view: format for lines which were not executed */ -td.lineNoCov, -span.lineNoCov -{ - background-color: #FF6230; -} - -/* Source code view: format for NoCov legend */ -span.coverLegendNoCov -{ - padding-left: 10px; - padding-right: 10px; - padding-bottom: 2px; - background-color: #FF6230; -} - -/* Source code view (function table): standard link - visited format */ -td.lineNoCov > a:visited, -td.lineCov > a:visited -{ - color: black; - text-decoration: underline; -} - -/* Source code view: format for lines which were executed only in a - previous version */ -span.lineDiffCov -{ - background-color: #B5F7AF; -} - -/* Source code view: format for branches which were executed - * and taken */ -span.branchCov -{ - background-color: #CAD7FE; -} - -/* Source code view: format for branches which were executed - * but not taken */ -span.branchNoCov -{ - background-color: #FF6230; -} - -/* Source code view: format for branches which were not executed */ -span.branchNoExec -{ - background-color: #FF6230; -} - -/* Source code view: format for the source code heading line */ -pre.sourceHeading -{ - white-space: pre; - font-family: monospace; - font-weight: bold; - margin: 0px; -} - -/* All views: header legend value for low rate */ -td.headerValueLegL -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 4px; - padding-right: 2px; - background-color: #FF0000; - font-size: 80%; -} - -/* All views: header legend value for med rate */ -td.headerValueLegM -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 2px; - background-color: #FFEA20; - font-size: 80%; -} - -/* All views: header legend value for hi rate */ -td.headerValueLegH -{ - font-family: sans-serif; - text-align: center; - white-space: nowrap; - padding-left: 2px; - padding-right: 4px; - background-color: #A7FC9D; - font-size: 80%; -} - -/* All views except source code view: legend format for low coverage */ -span.coverLegendCovLo -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #FF0000; -} - -/* All views except source code view: legend format for med coverage */ -span.coverLegendCovMed -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #FFEA20; -} - -/* All views except source code view: legend format for hi coverage */ -span.coverLegendCovHi -{ - padding-left: 10px; - padding-right: 10px; - padding-top: 2px; - background-color: #A7FC9D; -} diff --git a/packages/camera/camera_platform_interface/coverage/html/glass.png b/packages/camera/camera_platform_interface/coverage/html/glass.png deleted file mode 100644 index e1abc00680a3093c49fdb775ae6bdb6764c95af2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)gaEa{HEjtmSN`?>!lvI6;R0X`wF z|Ns97GD8ntt^-nxB|(0{3=Yq3q=7g|-tI089jvk*Kn`btM`SSr1Gf+eGhVt|_XjA* zUgGKN%6^Gmn4d%Ph(nkFP>9RZ#WAE}PI3Z}&BVayv3^M*kj3EX>gTe~DWM4f=_Dpv diff --git a/packages/camera/camera_platform_interface/coverage/html/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/index-sort-f.html deleted file mode 100644 index 64c6d7a42230..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/index-sort-f.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:25926996.3 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils -
100.0%
-
100.0 %5 / 5-0 / 0
types -
94.7%94.7%
-
94.7 %36 / 38-0 / 0
method_channel -
94.7%94.7%
-
94.7 %108 / 114-0 / 0
platform_interface -
95.5%95.5%
-
95.5 %42 / 44-0 / 0
events -
100.0%
-
100.0 %68 / 68-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/index-sort-l.html deleted file mode 100644 index cc0e305d2832..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/index-sort-l.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:25926996.3 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
types -
94.7%94.7%
-
94.7 %36 / 38-0 / 0
method_channel -
94.7%94.7%
-
94.7 %108 / 114-0 / 0
platform_interface -
95.5%95.5%
-
95.5 %42 / 44-0 / 0
utils -
100.0%
-
100.0 %5 / 5-0 / 0
events -
100.0%
-
100.0 %68 / 68-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/index.html b/packages/camera/camera_platform_interface/coverage/html/index.html deleted file mode 100644 index b4cb4e816b3a..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/index.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - LCOV - lcov.info - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top levelHitTotalCoverage
Test:lcov.infoLines:25926996.3 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
events -
100.0%
-
100.0 %68 / 68-0 / 0
method_channel -
94.7%94.7%
-
94.7 %108 / 114-0 / 0
platform_interface -
95.5%95.5%
-
95.5 %42 / 44-0 / 0
types -
94.7%94.7%
-
94.7 %36 / 38-0 / 0
utils -
100.0%
-
100.0 %5 / 5-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-f.html deleted file mode 100644 index a515bba57ad1..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-f.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - method_channel - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - method_channelHitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
method_channel_camera.dart -
94.7%94.7%
-
94.7 %108 / 114-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-l.html deleted file mode 100644 index 8991e20f97fa..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/method_channel/index-sort-l.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - method_channel - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - method_channelHitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
method_channel_camera.dart -
94.7%94.7%
-
94.7 %108 / 114-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/index.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/index.html deleted file mode 100644 index 7ab55baa6a6c..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/method_channel/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - method_channel - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - method_channelHitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
method_channel_camera.dart -
94.7%94.7%
-
94.7 %108 / 114-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func-sort-c.html deleted file mode 100644 index b05a267856fd..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - method_channel/method_channel_camera.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - method_channel - method_channel_camera.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func.html deleted file mode 100644 index 05e9a436d9ce..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - method_channel/method_channel_camera.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - method_channel - method_channel_camera.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.gcov.html deleted file mode 100644 index 28f1f07b9acf..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/method_channel/method_channel_camera.dart.gcov.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - - LCOV - lcov.info - method_channel/method_channel_camera.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - method_channel - method_channel_camera.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:10811494.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : import 'dart:async';
-       6             : 
-       7             : import 'package:camera_platform_interface/camera_platform_interface.dart';
-       8             : import 'package:camera_platform_interface/src/types/image_format_group.dart';
-       9             : import 'package:camera_platform_interface/src/utils/utils.dart';
-      10             : import 'package:cross_file/cross_file.dart';
-      11             : import 'package:flutter/services.dart';
-      12             : import 'package:flutter/widgets.dart';
-      13             : import 'package:meta/meta.dart';
-      14             : import 'package:stream_transform/stream_transform.dart';
-      15             : 
-      16             : const MethodChannel _channel = MethodChannel('plugins.flutter.io/camera');
-      17             : 
-      18             : /// An implementation of [CameraPlatform] that uses method channels.
-      19             : class MethodChannelCamera extends CameraPlatform {
-      20             :   final Map<int, MethodChannel> _channels = {};
-      21             : 
-      22             :   /// The controller we need to broadcast the different events coming
-      23             :   /// from handleMethodCall.
-      24             :   ///
-      25             :   /// It is a `broadcast` because multiple controllers will connect to
-      26             :   /// different stream views of this Controller.
-      27             :   /// This is only exposed for test purposes. It shouldn't be used by clients of
-      28             :   /// the plugin as it may break or change at any time.
-      29             :   @visibleForTesting
-      30             :   final StreamController<CameraEvent> cameraEventStreamController =
-      31             :       StreamController<CameraEvent>.broadcast();
-      32             : 
-      33           1 :   Stream<CameraEvent> _events(int cameraId) =>
-      34           2 :       cameraEventStreamController.stream
-      35           4 :           .where((event) => event.cameraId == cameraId);
-      36             : 
-      37             :   @override
-      38           1 :   Future<List<CameraDescription>> availableCameras() async {
-      39             :     try {
-      40           1 :       final List<Map<dynamic, dynamic>> cameras = await _channel
-      41           1 :           .invokeListMethod<Map<dynamic, dynamic>>('availableCameras');
-      42           2 :       return cameras.map((Map<dynamic, dynamic> camera) {
-      43           1 :         return CameraDescription(
-      44           1 :           name: camera['name'],
-      45           2 :           lensDirection: parseCameraLensDirection(camera['lensFacing']),
-      46           1 :           sensorOrientation: camera['sensorOrientation'],
-      47             :         );
-      48           1 :       }).toList();
-      49           1 :     } on PlatformException catch (e) {
-      50           3 :       throw CameraException(e.code, e.message);
-      51             :     }
-      52             :   }
-      53             : 
-      54             :   @override
-      55           1 :   Future<int> createCamera(
-      56             :     CameraDescription cameraDescription,
-      57             :     ResolutionPreset resolutionPreset, {
-      58             :     bool enableAudio,
-      59             :   }) async {
-      60             :     try {
-      61             :       final Map<String, dynamic> reply =
-      62           2 :           await _channel.invokeMapMethod<String, dynamic>(
-      63             :         'create',
-      64           1 :         <String, dynamic>{
-      65           1 :           'cameraName': cameraDescription.name,
-      66             :           'resolutionPreset': resolutionPreset != null
-      67           1 :               ? _serializeResolutionPreset(resolutionPreset)
-      68             :               : null,
-      69             :           'enableAudio': enableAudio,
-      70             :         },
-      71             :       );
-      72           1 :       return reply['cameraId'];
-      73           1 :     } on PlatformException catch (e) {
-      74           3 :       throw CameraException(e.code, e.message);
-      75             :     }
-      76             :   }
-      77             : 
-      78           1 :   @override
-      79             :   Future<void> initializeCamera(int cameraId, {ImageFormatGroup imageFormatGroup}) {
-      80           3 :     _channels.putIfAbsent(cameraId, () {
-      81           2 :       final channel = MethodChannel('flutter.io/cameraPlugin/camera$cameraId');
-      82           1 :       channel.setMethodCallHandler(
-      83           0 :           (MethodCall call) => handleMethodCall(call, cameraId));
-      84             :       return channel;
-      85             :     });
-      86             : 
-      87           1 :     Completer _completer = Completer();
-      88             : 
-      89           4 :     onCameraInitialized(cameraId).first.then((value) {
-      90           1 :       _completer.complete();
-      91             :     });
-      92             : 
-      93           1 :     _channel.invokeMapMethod<String, dynamic>(
-      94             :       'initialize',
-      95           1 :       <String, dynamic>{
-      96             :         'cameraId': cameraId,
-      97           1 :         'imageFormatGroup': imageFormatGroup.name(),
-      98             :       },
-      99             :     );
-     100             : 
-     101           1 :     return _completer.future;
-     102             :   }
-     103             : 
-     104             :   @override
-     105           1 :   Future<void> dispose(int cameraId) async {
-     106           2 :     await _channel.invokeMethod<void>(
-     107             :       'dispose',
-     108           1 :       <String, dynamic>{'cameraId': cameraId},
-     109             :     );
-     110             : 
-     111           2 :     if (_channels.containsKey(cameraId)) {
-     112           3 :       _channels[cameraId].setMethodCallHandler(null);
-     113           2 :       _channels.remove(cameraId);
-     114             :     }
-     115             :   }
-     116             : 
-     117           1 :   @override
-     118             :   Stream<CameraInitializedEvent> onCameraInitialized(int cameraId) {
-     119           2 :     return _events(cameraId).whereType<CameraInitializedEvent>();
-     120             :   }
-     121             : 
-     122           1 :   @override
-     123             :   Stream<CameraResolutionChangedEvent> onCameraResolutionChanged(int cameraId) {
-     124           2 :     return _events(cameraId).whereType<CameraResolutionChangedEvent>();
-     125             :   }
-     126             : 
-     127           1 :   @override
-     128             :   Stream<CameraClosingEvent> onCameraClosing(int cameraId) {
-     129           2 :     return _events(cameraId).whereType<CameraClosingEvent>();
-     130             :   }
-     131             : 
-     132           1 :   @override
-     133             :   Stream<CameraErrorEvent> onCameraError(int cameraId) {
-     134           2 :     return _events(cameraId).whereType<CameraErrorEvent>();
-     135             :   }
-     136             : 
-     137             :   @override
-     138           1 :   Future<XFile> takePicture(int cameraId) async {
-     139           2 :     String path = await _channel.invokeMethod<String>(
-     140             :       'takePicture',
-     141           1 :       <String, dynamic>{'cameraId': cameraId},
-     142             :     );
-     143           1 :     return XFile(path);
-     144             :   }
-     145             : 
-     146           1 :   @override
-     147             :   Future<void> prepareForVideoRecording() =>
-     148           1 :       _channel.invokeMethod<void>('prepareForVideoRecording');
-     149             : 
-     150             :   @override
-     151           1 :   Future<void> startVideoRecording(int cameraId) async {
-     152           2 :     await _channel.invokeMethod<void>(
-     153             :       'startVideoRecording',
-     154           1 :       <String, dynamic>{'cameraId': cameraId},
-     155             :     );
-     156             :   }
-     157             : 
-     158             :   @override
-     159           1 :   Future<XFile> stopVideoRecording(int cameraId) async {
-     160           2 :     String path = await _channel.invokeMethod<String>(
-     161             :       'stopVideoRecording',
-     162           1 :       <String, dynamic>{'cameraId': cameraId},
-     163             :     );
-     164           1 :     return XFile(path);
-     165             :   }
-     166             : 
-     167           1 :   @override
-     168           1 :   Future<void> pauseVideoRecording(int cameraId) => _channel.invokeMethod<void>(
-     169             :         'pauseVideoRecording',
-     170           1 :         <String, dynamic>{'cameraId': cameraId},
-     171             :       );
-     172             : 
-     173           1 :   @override
-     174             :   Future<void> resumeVideoRecording(int cameraId) =>
-     175           1 :       _channel.invokeMethod<void>(
-     176             :         'resumeVideoRecording',
-     177           1 :         <String, dynamic>{'cameraId': cameraId},
-     178             :       );
-     179             : 
-     180           1 :   @override
-     181             :   Future<void> setFlashMode(int cameraId, FlashMode mode) =>
-     182           1 :       _channel.invokeMethod<void>(
-     183             :         'setFlashMode',
-     184           1 :         <String, dynamic>{
-     185             :           'cameraId': cameraId,
-     186           1 :           'mode': _serializeFlashMode(mode),
-     187             :         },
-     188             :       );
-     189             : 
-     190           1 :   @override
-     191           1 :   Future<double> getMaxZoomLevel(int cameraId) => _channel.invokeMethod<double>(
-     192             :         'getMaxZoomLevel',
-     193           1 :         <String, dynamic>{'cameraId': cameraId},
-     194             :       );
-     195             : 
-     196           1 :   @override
-     197           1 :   Future<double> getMinZoomLevel(int cameraId) => _channel.invokeMethod<double>(
-     198             :         'getMinZoomLevel',
-     199           1 :         <String, dynamic>{'cameraId': cameraId},
-     200             :       );
-     201             : 
-     202             :   @override
-     203           1 :   Future<void> setZoomLevel(int cameraId, double zoom) async {
-     204             :     try {
-     205           2 :       await _channel.invokeMethod<double>(
-     206             :         'setZoomLevel',
-     207           1 :         <String, dynamic>{
-     208             :           'cameraId': cameraId,
-     209             :           'zoom': zoom,
-     210             :         },
-     211             :       );
-     212           1 :     } on PlatformException catch (e) {
-     213           3 :       throw CameraException(e.code, e.message);
-     214             :     }
-     215             :   }
-     216             : 
-     217           1 :   @override
-     218             :   Widget buildPreview(int cameraId) {
-     219           1 :     return Texture(textureId: cameraId);
-     220             :   }
-     221             : 
-     222             :   /// Returns the flash mode as a String.
-     223           1 :   String _serializeFlashMode(FlashMode flashMode) {
-     224             :     switch (flashMode) {
-     225           1 :       case FlashMode.off:
-     226             :         return 'off';
-     227           1 :       case FlashMode.auto:
-     228             :         return 'auto';
-     229           1 :       case FlashMode.always:
-     230             :         return 'always';
-     231           0 :       case FlashMode.torch:
-     232             :         return 'torch';
-     233             :       default:
-     234           0 :         throw ArgumentError('Unknown FlashMode value');
-     235             :     }
-     236             :   }
-     237             : 
-     238             :   /// Returns the resolution preset as a String.
-     239           1 :   String _serializeResolutionPreset(ResolutionPreset resolutionPreset) {
-     240             :     switch (resolutionPreset) {
-     241           1 :       case ResolutionPreset.max:
-     242             :         return 'max';
-     243           1 :       case ResolutionPreset.ultraHigh:
-     244             :         return 'ultraHigh';
-     245           1 :       case ResolutionPreset.veryHigh:
-     246             :         return 'veryHigh';
-     247           1 :       case ResolutionPreset.high:
-     248             :         return 'high';
-     249           0 :       case ResolutionPreset.medium:
-     250             :         return 'medium';
-     251           0 :       case ResolutionPreset.low:
-     252             :         return 'low';
-     253             :       default:
-     254           0 :         throw ArgumentError('Unknown ResolutionPreset value');
-     255             :     }
-     256             :   }
-     257             : 
-     258             :   /// Converts messages received from the native platform into events.
-     259             :   ///
-     260             :   /// This is only exposed for test purposes. It shouldn't be used by clients of
-     261             :   /// the plugin as it may break or change at any time.
-     262             :   @visibleForTesting
-     263           1 :   Future<dynamic> handleMethodCall(MethodCall call, int cameraId) async {
-     264           1 :     switch (call.method) {
-     265           1 :       case 'initialized':
-     266           3 :         cameraEventStreamController.add(CameraInitializedEvent(
-     267             :           cameraId,
-     268           2 :           call.arguments['previewWidth'],
-     269           2 :           call.arguments['previewHeight'],
-     270             :         ));
-     271             :         break;
-     272           1 :       case 'resolution_changed':
-     273           3 :         cameraEventStreamController.add(CameraResolutionChangedEvent(
-     274             :           cameraId,
-     275           2 :           call.arguments['captureWidth'],
-     276           2 :           call.arguments['captureHeight'],
-     277             :         ));
-     278             :         break;
-     279           1 :       case 'camera_closing':
-     280           3 :         cameraEventStreamController.add(CameraClosingEvent(
-     281             :           cameraId,
-     282             :         ));
-     283             :         break;
-     284           1 :       case 'error':
-     285           3 :         cameraEventStreamController.add(CameraErrorEvent(
-     286             :           cameraId,
-     287           2 :           call.arguments['description'],
-     288             :         ));
-     289             :         break;
-     290             :       default:
-     291           1 :         throw MissingPluginException();
-     292             :     }
-     293             :   }
-     294             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func-sort-c.html deleted file mode 100644 index 0418f4f78823..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - platform_interface/camera_platform.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - platform_interface - camera_platform.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func.html deleted file mode 100644 index 08900de0c15a..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - platform_interface/camera_platform.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - platform_interface - camera_platform.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.gcov.html deleted file mode 100644 index 61985292e523..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/platform_interface/camera_platform.dart.gcov.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - LCOV - lcov.info - platform_interface/camera_platform.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - platform_interface - camera_platform.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : import 'dart:async';
-       6             : 
-       7             : import 'package:camera_platform_interface/camera_platform_interface.dart';
-       8             : import 'package:camera_platform_interface/src/method_channel/method_channel_camera.dart';
-       9             : import 'package:camera_platform_interface/src/types/image_format_group.dart';
-      10             : import 'package:cross_file/cross_file.dart';
-      11             : import 'package:flutter/widgets.dart';
-      12             : import 'package:plugin_platform_interface/plugin_platform_interface.dart';
-      13             : 
-      14             : /// The interface that implementations of camera must implement.
-      15             : ///
-      16             : /// Platform implementations should extend this class rather than implement it as `camera`
-      17             : /// does not consider newly added methods to be breaking changes. Extending this class
-      18             : /// (using `extends`) ensures that the subclass will get the default implementation, while
-      19             : /// platform implementations that `implements` this interface will be broken by newly added
-      20             : /// [CameraPlatform] methods.
-      21             : abstract class CameraPlatform extends PlatformInterface {
-      22             :   /// Constructs a CameraPlatform.
-      23           6 :   CameraPlatform() : super(token: _token);
-      24             : 
-      25           6 :   static final Object _token = Object();
-      26             : 
-      27           3 :   static CameraPlatform _instance = MethodChannelCamera();
-      28             : 
-      29             :   /// The default instance of [CameraPlatform] to use.
-      30             :   ///
-      31             :   /// Defaults to [MethodChannelCamera].
-      32           2 :   static CameraPlatform get instance => _instance;
-      33             : 
-      34             :   /// Platform-specific plugins should set this with their own platform-specific
-      35             :   /// class that extends [CameraPlatform] when they register themselves.
-      36           1 :   static set instance(CameraPlatform instance) {
-      37           2 :     PlatformInterface.verifyToken(instance, _token);
-      38             :     _instance = instance;
-      39             :   }
-      40             : 
-      41             :   /// Completes with a list of available cameras.
-      42           1 :   Future<List<CameraDescription>> availableCameras() {
-      43           1 :     throw UnimplementedError('availableCameras() is not implemented.');
-      44             :   }
-      45             : 
-      46             :   /// Creates an uninitialized camera instance and returns the cameraId.
-      47           1 :   Future<int> createCamera(
-      48             :     CameraDescription cameraDescription,
-      49             :     ResolutionPreset resolutionPreset, {
-      50             :     bool enableAudio,
-      51             :   }) {
-      52           1 :     throw UnimplementedError('createCamera() is not implemented.');
-      53             :   }
-      54             : 
-      55             :   /// Initializes the camera on the device.
-      56             :   ///
-      57             :   /// [imageFormatGroup] is used to specify the image formatting used.
-      58             :   /// On Android this defaults to ImageFormat.YUV_420_888 and applies only to the imageStream.
-      59             :   /// On iOS this defaults to kCVPixelFormatType_32BGRA.
-      60           1 :   Future<void> initializeCamera(int cameraId, {ImageFormatGroup imageFormatGroup}) {
-      61           1 :     throw UnimplementedError('initializeCamera() is not implemented.');
-      62             :   }
-      63             : 
-      64             :   /// The camera has been initialized
-      65           1 :   Stream<CameraInitializedEvent> onCameraInitialized(int cameraId) {
-      66           1 :     throw UnimplementedError('onCameraInitialized() is not implemented.');
-      67             :   }
-      68             : 
-      69             :   /// The camera's resolution has changed
-      70           1 :   Stream<CameraResolutionChangedEvent> onCameraResolutionChanged(int cameraId) {
-      71           1 :     throw UnimplementedError('onResolutionChanged() is not implemented.');
-      72             :   }
-      73             : 
-      74             :   /// The camera started to close.
-      75           1 :   Stream<CameraClosingEvent> onCameraClosing(int cameraId) {
-      76           1 :     throw UnimplementedError('onCameraClosing() is not implemented.');
-      77             :   }
-      78             : 
-      79             :   /// The camera experienced an error.
-      80           1 :   Stream<CameraErrorEvent> onCameraError(int cameraId) {
-      81           1 :     throw UnimplementedError('onCameraError() is not implemented.');
-      82             :   }
-      83             : 
-      84             :   /// Captures an image and returns the file where it was saved.
-      85           1 :   Future<XFile> takePicture(int cameraId) {
-      86           1 :     throw UnimplementedError('takePicture() is not implemented.');
-      87             :   }
-      88             : 
-      89             :   /// Prepare the capture session for video recording.
-      90           1 :   Future<void> prepareForVideoRecording() {
-      91           1 :     throw UnimplementedError('prepareForVideoRecording() is not implemented.');
-      92             :   }
-      93             : 
-      94             :   /// Starts a video recording.
-      95             :   ///
-      96             :   /// The video is returned as a [XFile] after calling [stopVideoRecording].
-      97           1 :   Future<void> startVideoRecording(int cameraId) {
-      98           1 :     throw UnimplementedError('startVideoRecording() is not implemented.');
-      99             :   }
-     100             : 
-     101             :   /// Stops the video recording and returns the file where it was saved.
-     102           1 :   Future<XFile> stopVideoRecording(int cameraId) {
-     103           1 :     throw UnimplementedError('stopVideoRecording() is not implemented.');
-     104             :   }
-     105             : 
-     106             :   /// Pause video recording.
-     107           1 :   Future<void> pauseVideoRecording(int cameraId) {
-     108           1 :     throw UnimplementedError('pauseVideoRecording() is not implemented.');
-     109             :   }
-     110             : 
-     111             :   /// Resume video recording after pausing.
-     112           1 :   Future<void> resumeVideoRecording(int cameraId) {
-     113           1 :     throw UnimplementedError('resumeVideoRecording() is not implemented.');
-     114             :   }
-     115             : 
-     116             :   /// Sets the flash mode for the selected camera.
-     117           1 :   Future<void> setFlashMode(int cameraId, FlashMode mode) {
-     118           1 :     throw UnimplementedError('setFlashMode() is not implemented.');
-     119             :   }
-     120             : 
-     121             :   /// Gets the maximum supported zoom level for the selected camera.
-     122           1 :   Future<double> getMaxZoomLevel(int cameraId) {
-     123           1 :     throw UnimplementedError('getMaxZoomLevel() is not implemented.');
-     124             :   }
-     125             : 
-     126             :   /// Gets the minimum supported zoom level for the selected camera.
-     127           1 :   Future<double> getMinZoomLevel(int cameraId) {
-     128           1 :     throw UnimplementedError('getMinZoomLevel() is not implemented.');
-     129             :   }
-     130             : 
-     131             :   /// Set the zoom level for the selected camera.
-     132             :   ///
-     133             :   /// The supplied [zoom] value should be between 1.0 and the maximum supported
-     134             :   /// zoom level returned by the `getMaxZoomLevel`. Throws an `CameraException`
-     135             :   /// when an illegal zoom level is supplied.
-     136           1 :   Future<void> setZoomLevel(int cameraId, double zoom) {
-     137           1 :     throw UnimplementedError('setZoomLevel() is not implemented.');
-     138             :   }
-     139             : 
-     140             :   /// Returns a widget showing a live camera preview.
-     141           0 :   Widget buildPreview(int cameraId) {
-     142           0 :     throw UnimplementedError('buildView() has not been implemented.');
-     143             :   }
-     144             : 
-     145             :   /// Releases the resources of this camera.
-     146           1 :   Future<void> dispose(int cameraId) {
-     147           1 :     throw UnimplementedError('dispose() is not implemented.');
-     148             :   }
-     149             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-f.html deleted file mode 100644 index ed133c8e7439..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-f.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - platform_interface - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - platform_interfaceHitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_platform.dart -
95.5%95.5%
-
95.5 %42 / 44-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-l.html deleted file mode 100644 index a38f4c0fb8b5..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index-sort-l.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - platform_interface - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - platform_interfaceHitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_platform.dart -
95.5%95.5%
-
95.5 %42 / 44-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index.html b/packages/camera/camera_platform_interface/coverage/html/platform_interface/index.html deleted file mode 100644 index 82c80ddfd89d..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/platform_interface/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - platform_interface - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - platform_interfaceHitTotalCoverage
Test:lcov.infoLines:424495.5 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_platform.dart -
95.5%95.5%
-
95.5 %42 / 44-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/ruby.png b/packages/camera/camera_platform_interface/coverage/html/ruby.png deleted file mode 100644 index 991b6d4ec9e78be165e3ef757eed1aada287364d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^FceV#7`HfI^%F z9+AZi4BSE>%y{W;-5;PJOS+@4BLl<6e(pbstUx|nfKQ0)e^Y%R^MdiLxj>4`)5S5Q b;#P73kj=!v_*DHKNFRfztDnm{r-UW|iOwIS diff --git a/packages/camera/camera_platform_interface/coverage/html/snow.png b/packages/camera/camera_platform_interface/coverage/html/snow.png deleted file mode 100644 index 2cdae107fceec6e7f02ac7acb4a34a82a540caa5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga>?NMQuI!iC1^MM!lvI6;R0X`wF|Ns97GD8ntt^-nBo-U3d c6}OTTfNUlP#;5A{K>8RwUHx3vIVCg!071?oo&W#< diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func-sort-c.html deleted file mode 100644 index 9a25fd2bc0eb..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/camera_description.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - camera_description.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:121485.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func.html deleted file mode 100644 index 291bacbbf826..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/camera_description.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - camera_description.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:121485.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.gcov.html deleted file mode 100644 index 0c0fe89ac6a5..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/camera_description.dart.gcov.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - LCOV - lcov.info - types/camera_description.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - camera_description.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:121485.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : /// The direction the camera is facing.
-       6           9 : enum CameraLensDirection {
-       7             :   /// Front facing camera (a user looking at the screen is seen by the camera).
-       8           9 :   front,
-       9             : 
-      10             :   /// Back facing camera (a user looking at the screen is not seen by the camera).
-      11           9 :   back,
-      12             : 
-      13             :   /// External camera which may not be mounted to the device.
-      14           9 :   external,
-      15             : }
-      16             : 
-      17             : /// Properties of a camera device.
-      18             : class CameraDescription {
-      19             :   /// Creates a new camera description with the given properties.
-      20           2 :   CameraDescription({this.name, this.lensDirection, this.sensorOrientation});
-      21             : 
-      22             :   /// The name of the camera device.
-      23             :   final String name;
-      24             : 
-      25             :   /// The direction the camera is facing.
-      26             :   final CameraLensDirection lensDirection;
-      27             : 
-      28             :   /// Clockwise angle through which the output image needs to be rotated to be upright on the device screen in its native orientation.
-      29             :   ///
-      30             :   /// **Range of valid values:**
-      31             :   /// 0, 90, 180, 270
-      32             :   ///
-      33             :   /// On Android, also defines the direction of rolling shutter readout, which
-      34             :   /// is from top to bottom in the sensor's coordinate system.
-      35             :   final int sensorOrientation;
-      36             : 
-      37           2 :   @override
-      38             :   bool operator ==(Object other) =>
-      39             :       identical(this, other) ||
-      40           2 :       other is CameraDescription &&
-      41           6 :           runtimeType == other.runtimeType &&
-      42           6 :           name == other.name &&
-      43           6 :           lensDirection == other.lensDirection;
-      44             : 
-      45           1 :   @override
-      46           5 :   int get hashCode => name.hashCode ^ lensDirection.hashCode;
-      47             : 
-      48           0 :   @override
-      49             :   String toString() {
-      50           0 :     return '$runtimeType($name, $lensDirection, $sensorOrientation)';
-      51             :   }
-      52             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func-sort-c.html deleted file mode 100644 index d7934f4afbb6..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/camera_exception.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - camera_exception.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:33100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func.html deleted file mode 100644 index f51a62224a79..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/camera_exception.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - camera_exception.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:33100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.gcov.html deleted file mode 100644 index bbb37aeb1548..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/camera_exception.dart.gcov.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - LCOV - lcov.info - types/camera_exception.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - camera_exception.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:33100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2018 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : /// This is thrown when the plugin reports an error.
-       6             : class CameraException implements Exception {
-       7             :   /// Creates a new camera exception with the given error code and description.
-       8           2 :   CameraException(this.code, this.description);
-       9             : 
-      10             :   /// Error code.
-      11             :   // TODO(bparrishMines): Document possible error codes.
-      12             :   // https://github.com/flutter/flutter/issues/69298
-      13             :   String code;
-      14             : 
-      15             :   /// Textual description of the error.
-      16             :   String description;
-      17             : 
-      18           1 :   @override
-      19           3 :   String toString() => 'CameraException($code, $description)';
-      20             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func-sort-c.html deleted file mode 100644 index aa1eb1b767a4..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/flash_mode.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - flash_mode.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func.html deleted file mode 100644 index 9536d183eb77..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/flash_mode.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - flash_mode.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.gcov.html deleted file mode 100644 index 258cc1dc1154..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/flash_mode.dart.gcov.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - LCOV - lcov.info - types/flash_mode.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - flash_mode.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2019 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : /// The possible flash modes that can be set for a camera
-       6           9 : enum FlashMode {
-       7             :   /// Do not use the flash when taking a picture.
-       8           9 :   off,
-       9             : 
-      10             :   /// Let the device decide whether to flash the camera when taking a picture.
-      11           9 :   auto,
-      12             : 
-      13             :   /// Always use the flash when taking a picture.
-      14           9 :   always,
-      15             : 
-      16             :   /// Turns on the flash light and keeps it on until switched off.
-      17           9 :   torch,
-      18             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func-sort-c.html deleted file mode 100644 index 160a2977ee4e..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/image_format_group.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - image_format_group.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func.html deleted file mode 100644 index 3874d891e3dd..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/image_format_group.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - image_format_group.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.gcov.html deleted file mode 100644 index 3b8b8e7da196..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/image_format_group.dart.gcov.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - LCOV - lcov.info - types/image_format_group.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - image_format_group.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:99100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : /// Group of image formats that are comparable across Android and iOS platforms.
-       2           9 : enum ImageFormatGroup {
-       3             :   /// The image format does not fit into any specific group.
-       4           9 :   unknown,
-       5             : 
-       6             :   /// Multi-plane YUV 420 format.
-       7             :   ///
-       8             :   /// This format is a generic YCbCr format, capable of describing any 4:2:0
-       9             :   /// chroma-subsampled planar or semiplanar buffer (but not fully interleaved),
-      10             :   /// with 8 bits per color sample.
-      11             :   ///
-      12             :   /// On Android, this is `android.graphics.ImageFormat.YUV_420_888`. See
-      13             :   /// https://developer.android.com/reference/android/graphics/ImageFormat.html#YUV_420_888
-      14             :   ///
-      15             :   /// On iOS, this is `kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange`. See
-      16             :   /// https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_420ypcbcr8biplanarvideorange?language=objc
-      17           9 :   yuv420,
-      18             : 
-      19             :   /// 32-bit BGRA.
-      20             :   ///
-      21             :   /// On iOS, this is `kCVPixelFormatType_32BGRA`. See
-      22             :   /// https://developer.apple.com/documentation/corevideo/1563591-pixel_format_identifiers/kcvpixelformattype_32bgra?language=objc
-      23           9 :   bgra8888,
-      24             : 
-      25             :   /// 32-big RGB image encoded into JPEG bytes.
-      26             :   ///
-      27             :   /// On Android, this is `android.graphics.ImageFormat.JPEG`. See
-      28             :   /// https://developer.android.com/reference/android/graphics/ImageFormat#JPEG
-      29           9 :   jpeg,
-      30             : }
-      31             : 
-      32             : /// Extension on [ImageFormatGroup] to stringify the enum
-      33             : extension ImageFormatGroupName on ImageFormatGroup {
-      34             :   /// returns a String value for [ImageFormatGroup]
-      35             :   /// returns 'unknown' if platform is not supported
-      36             :   /// or if [ImageFormatGroup] is not supported for the platform
-      37           2 :   String name() {
-      38             :     switch (this) {
-      39           2 :       case ImageFormatGroup.bgra8888:
-      40             :         return 'bgra8888';
-      41           2 :       case ImageFormatGroup.yuv420:
-      42             :         return 'yuv420';
-      43           2 :       case ImageFormatGroup.jpeg:
-      44             :         return 'jpeg';
-      45             :       case ImageFormatGroup.unknown:
-      46             :       default:
-      47             :         return 'unknown';
-      48             :     }
-      49             :   }
-      50             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/types/index-sort-f.html deleted file mode 100644 index aef40f7ff5f3..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/index-sort-f.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - LCOV - lcov.info - types - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - typesHitTotalCoverage
Test:lcov.infoLines:363894.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
image_format_group.dart -
100.0%
-
100.0 %9 / 9-0 / 0
camera_description.dart -
85.7%85.7%
-
85.7 %12 / 14-0 / 0
flash_mode.dart -
100.0%
-
100.0 %5 / 5-0 / 0
camera_exception.dart -
100.0%
-
100.0 %3 / 3-0 / 0
resolution_preset.dart -
100.0%
-
100.0 %7 / 7-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/types/index-sort-l.html deleted file mode 100644 index 0b5ae6e65dab..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/index-sort-l.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - LCOV - lcov.info - types - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - typesHitTotalCoverage
Test:lcov.infoLines:363894.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_description.dart -
85.7%85.7%
-
85.7 %12 / 14-0 / 0
camera_exception.dart -
100.0%
-
100.0 %3 / 3-0 / 0
flash_mode.dart -
100.0%
-
100.0 %5 / 5-0 / 0
resolution_preset.dart -
100.0%
-
100.0 %7 / 7-0 / 0
image_format_group.dart -
100.0%
-
100.0 %9 / 9-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/index.html b/packages/camera/camera_platform_interface/coverage/html/types/index.html deleted file mode 100644 index ded928c90dc4..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/index.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - LCOV - lcov.info - types - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - typesHitTotalCoverage
Test:lcov.infoLines:363894.7 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
camera_description.dart -
85.7%85.7%
-
85.7 %12 / 14-0 / 0
camera_exception.dart -
100.0%
-
100.0 %3 / 3-0 / 0
flash_mode.dart -
100.0%
-
100.0 %5 / 5-0 / 0
image_format_group.dart -
100.0%
-
100.0 %9 / 9-0 / 0
resolution_preset.dart -
100.0%
-
100.0 %7 / 7-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func-sort-c.html deleted file mode 100644 index 5bbb45034ce6..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/resolution_preset.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - resolution_preset.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:77100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func.html deleted file mode 100644 index 87eed3a643ae..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - types/resolution_preset.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - resolution_preset.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:77100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.gcov.html deleted file mode 100644 index 4ffdbdd36f38..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/types/resolution_preset.dart.gcov.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - LCOV - lcov.info - types/resolution_preset.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - types - resolution_preset.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:77100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : // Copyright 2019 The Chromium Authors. All rights reserved.
-       2             : // Use of this source code is governed by a BSD-style license that can be
-       3             : // found in the LICENSE file.
-       4             : 
-       5             : /// Affect the quality of video recording and image capture:
-       6             : ///
-       7             : /// If a preset is not available on the camera being used a preset of lower quality will be selected automatically.
-       8           9 : enum ResolutionPreset {
-       9             :   /// 352x288 on iOS, 240p (320x240) on Android
-      10           9 :   low,
-      11             : 
-      12             :   /// 480p (640x480 on iOS, 720x480 on Android)
-      13           9 :   medium,
-      14             : 
-      15             :   /// 720p (1280x720)
-      16           9 :   high,
-      17             : 
-      18             :   /// 1080p (1920x1080)
-      19           9 :   veryHigh,
-      20             : 
-      21             :   /// 2160p (3840x2160)
-      22           9 :   ultraHigh,
-      23             : 
-      24             :   /// The highest resolution available.
-      25           9 :   max,
-      26             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/updown.png b/packages/camera/camera_platform_interface/coverage/html/updown.png deleted file mode 100644 index aa56a238b3e6c435265250f9266cd1b8caba0f20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^AT}Qd8;}%R+`Ae`*?77*hG?8mPH5^{)z4*}Q$iB}huR`+ diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-f.html b/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-f.html deleted file mode 100644 index 1381f76d534d..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-f.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils.dart -
100.0%
-
100.0 %5 / 5-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-l.html b/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-l.html deleted file mode 100644 index d1335ad88648..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/utils/index-sort-l.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils.dart -
100.0%
-
100.0 %5 / 5-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/index.html b/packages/camera/camera_platform_interface/coverage/html/utils/index.html deleted file mode 100644 index 695376716ee5..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/utils/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - LCOV - lcov.info - utils - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utilsHitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - -

Filename Sort by nameLine Coverage Sort by line coverageFunctions Sort by function coverage
utils.dart -
100.0%
-
100.0 %5 / 5-0 / 0
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func-sort-c.html b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func-sort-c.html deleted file mode 100644 index 4c8ad0a79b3c..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func-sort-c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func.html b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func.html deleted file mode 100644 index db0ea2bc90e9..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.func.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/utils.dart - functions - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- -
- - - - - - -

Function Name Sort by function nameHit count Sort by hit count
-
-
- - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.gcov.html b/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.gcov.html deleted file mode 100644 index 1e567a1f97f5..000000000000 --- a/packages/camera/camera_platform_interface/coverage/html/utils/utils.dart.gcov.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - LCOV - lcov.info - utils/utils.dart - - - - - - - - - - - - - - -
LCOV - code coverage report
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Current view:top level - utils - utils.dart (source / functions)HitTotalCoverage
Test:lcov.infoLines:55100.0 %
Date:2020-12-23 15:59:41Functions:00-
-
- - - - - - - - -

-
          Line data    Source code
-
-       1             : import 'package:camera_platform_interface/camera_platform_interface.dart';
-       2             : 
-       3             : /// Parses a string into a corresponding CameraLensDirection.
-       4           2 : CameraLensDirection parseCameraLensDirection(String string) {
-       5             :   switch (string) {
-       6           2 :     case 'front':
-       7             :       return CameraLensDirection.front;
-       8           2 :     case 'back':
-       9             :       return CameraLensDirection.back;
-      10           1 :     case 'external':
-      11             :       return CameraLensDirection.external;
-      12             :   }
-      13           1 :   throw ArgumentError('Unknown CameraLensDirection value');
-      14             : }
-
-
-
- - - - -
Generated by: LCOV version 1.15
-
- - - diff --git a/packages/camera/camera_platform_interface/coverage/lcov.info b/packages/camera/camera_platform_interface/coverage/lcov.info deleted file mode 100644 index 6d005222231d..000000000000 --- a/packages/camera/camera_platform_interface/coverage/lcov.info +++ /dev/null @@ -1,305 +0,0 @@ -SF:lib/src/events/camera_event.dart -DA:27,2 -DA:29,2 -DA:32,2 -DA:33,6 -DA:34,6 -DA:36,1 -DA:37,2 -DA:53,2 -DA:57,2 -DA:61,1 -DA:62,1 -DA:63,1 -DA:64,2 -DA:68,4 -DA:69,2 -DA:70,2 -DA:71,2 -DA:74,2 -DA:77,2 -DA:78,2 -DA:79,6 -DA:80,6 -DA:81,6 -DA:83,1 -DA:85,7 -DA:101,2 -DA:105,2 -DA:109,1 -DA:110,1 -DA:111,1 -DA:112,2 -DA:116,4 -DA:117,2 -DA:118,2 -DA:119,2 -DA:122,2 -DA:125,2 -DA:126,2 -DA:127,6 -DA:128,6 -DA:129,6 -DA:131,1 -DA:133,7 -DA:140,4 -DA:144,1 -DA:145,2 -DA:149,4 -DA:150,2 -DA:153,2 -DA:156,2 -DA:157,2 -DA:158,6 -DA:160,1 -DA:161,1 -DA:173,4 -DA:177,1 -DA:178,1 -DA:179,2 -DA:183,4 -DA:184,2 -DA:185,2 -DA:188,2 -DA:191,2 -DA:192,2 -DA:193,6 -DA:194,6 -DA:196,1 -DA:197,4 -LF:68 -LH:68 -end_of_record -SF:lib/src/platform_interface/camera_platform.dart -DA:23,6 -DA:25,6 -DA:27,3 -DA:32,2 -DA:36,1 -DA:37,2 -DA:42,1 -DA:43,1 -DA:47,1 -DA:52,1 -DA:60,1 -DA:61,1 -DA:65,1 -DA:66,1 -DA:70,1 -DA:71,1 -DA:75,1 -DA:76,1 -DA:80,1 -DA:81,1 -DA:85,1 -DA:86,1 -DA:90,1 -DA:91,1 -DA:97,1 -DA:98,1 -DA:102,1 -DA:103,1 -DA:107,1 -DA:108,1 -DA:112,1 -DA:113,1 -DA:117,1 -DA:118,1 -DA:122,1 -DA:123,1 -DA:127,1 -DA:128,1 -DA:136,1 -DA:137,1 -DA:141,0 -DA:142,0 -DA:146,1 -DA:147,1 -LF:44 -LH:42 -end_of_record -SF:lib/src/method_channel/method_channel_camera.dart -DA:33,1 -DA:34,2 -DA:35,4 -DA:38,1 -DA:40,1 -DA:41,1 -DA:42,2 -DA:43,1 -DA:44,1 -DA:45,2 -DA:46,1 -DA:48,1 -DA:49,1 -DA:50,3 -DA:55,1 -DA:62,2 -DA:64,1 -DA:65,1 -DA:67,1 -DA:72,1 -DA:73,1 -DA:74,3 -DA:78,1 -DA:80,3 -DA:81,2 -DA:82,1 -DA:83,0 -DA:87,1 -DA:89,4 -DA:90,1 -DA:93,1 -DA:95,1 -DA:97,1 -DA:101,1 -DA:105,1 -DA:106,2 -DA:108,1 -DA:111,2 -DA:112,3 -DA:113,2 -DA:117,1 -DA:119,2 -DA:122,1 -DA:124,2 -DA:127,1 -DA:129,2 -DA:132,1 -DA:134,2 -DA:138,1 -DA:139,2 -DA:141,1 -DA:143,1 -DA:146,1 -DA:148,1 -DA:151,1 -DA:152,2 -DA:154,1 -DA:159,1 -DA:160,2 -DA:162,1 -DA:164,1 -DA:167,1 -DA:168,1 -DA:170,1 -DA:173,1 -DA:175,1 -DA:177,1 -DA:180,1 -DA:182,1 -DA:184,1 -DA:186,1 -DA:190,1 -DA:191,1 -DA:193,1 -DA:196,1 -DA:197,1 -DA:199,1 -DA:203,1 -DA:205,2 -DA:207,1 -DA:212,1 -DA:213,3 -DA:217,1 -DA:219,1 -DA:223,1 -DA:225,1 -DA:227,1 -DA:229,1 -DA:231,0 -DA:234,0 -DA:239,1 -DA:241,1 -DA:243,1 -DA:245,1 -DA:247,1 -DA:249,0 -DA:251,0 -DA:254,0 -DA:263,1 -DA:264,1 -DA:265,1 -DA:266,3 -DA:268,2 -DA:269,2 -DA:272,1 -DA:273,3 -DA:275,2 -DA:276,2 -DA:279,1 -DA:280,3 -DA:284,1 -DA:285,3 -DA:287,2 -DA:291,1 -LF:114 -LH:108 -end_of_record -SF:lib/src/types/image_format_group.dart -DA:2,9 -DA:4,9 -DA:17,9 -DA:23,9 -DA:29,9 -DA:37,2 -DA:39,2 -DA:41,2 -DA:43,2 -LF:9 -LH:9 -end_of_record -SF:lib/src/utils/utils.dart -DA:4,2 -DA:6,2 -DA:8,2 -DA:10,1 -DA:13,1 -LF:5 -LH:5 -end_of_record -SF:lib/src/types/camera_description.dart -DA:6,9 -DA:8,9 -DA:11,9 -DA:14,9 -DA:20,2 -DA:37,2 -DA:40,2 -DA:41,6 -DA:42,6 -DA:43,6 -DA:45,1 -DA:46,5 -DA:48,0 -DA:50,0 -LF:14 -LH:12 -end_of_record -SF:lib/src/types/camera_exception.dart -DA:8,2 -DA:18,1 -DA:19,3 -LF:3 -LH:3 -end_of_record -SF:lib/src/types/flash_mode.dart -DA:6,9 -DA:8,9 -DA:11,9 -DA:14,9 -DA:17,9 -LF:5 -LH:5 -end_of_record -SF:lib/src/types/resolution_preset.dart -DA:8,9 -DA:10,9 -DA:13,9 -DA:16,9 -DA:19,9 -DA:22,9 -DA:25,9 -LF:7 -LH:7 -end_of_record From c32af904137211c72f93c6dd3ae6d5e0358af56d Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 14:24:36 +0100 Subject: [PATCH 10/18] Updated documentation --- .../lib/src/platform_interface/camera_platform.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart index b607ba0a11d7..e1faecf374cd 100644 --- a/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart +++ b/packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart @@ -128,7 +128,7 @@ abstract class CameraPlatform extends PlatformInterface { /// The length of the recording can be limited by specifying the [maxVideoDuration]. /// By default no maximum duration is specified, /// meaning the recording will continue until manually stopped. - /// With [maxVideoDuration] set the video is returned as a [VideoRecordedEvent] + /// With [maxVideoDuration] set the video is returned in a [VideoRecordedEvent] /// through the [onVideoRecordedEvent] stream when the set duration is reached. Future startVideoRecording(int cameraId, {Duration maxVideoDuration}) { throw UnimplementedError('startVideoRecording() is not implemented.'); From e28f694df3ab48aeec7ad1c31003cd1f2dad4391 Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 15:13:22 +0100 Subject: [PATCH 11/18] Added maxVideoDuration in camera --- packages/camera/camera/CHANGELOG.md | 4 ++ packages/camera/camera/README.md | 12 +++- .../io/flutter/plugins/camera/Camera.java | 63 ++++++++++++++----- .../flutter/plugins/camera/DartMessenger.java | 14 ++++- .../plugins/camera/MethodCallHandlerImpl.java | 2 +- .../camera/media/MediaRecorderBuilder.java | 8 +++ packages/camera/camera/example/lib/main.dart | 3 +- .../camera/camera/ios/Classes/CameraPlugin.m | 41 ++++++++++-- packages/camera/camera/lib/camera.dart | 1 + .../camera/lib/src/camera_controller.dart | 24 ++++++- packages/camera/camera/pubspec.yaml | 5 +- 11 files changed, 147 insertions(+), 30 deletions(-) diff --git a/packages/camera/camera/CHANGELOG.md b/packages/camera/camera/CHANGELOG.md index a8dbe65e7453..e0909de1bed1 100644 --- a/packages/camera/camera/CHANGELOG.md +++ b/packages/camera/camera/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.1 + +* Implemented maxVideoDuration to limit the duration of a video recording. + ## 0.7.0+2 * Fix example reference in README. diff --git a/packages/camera/camera/README.md b/packages/camera/camera/README.md index b9fdd7384297..22848cf822c1 100644 --- a/packages/camera/camera/README.md +++ b/packages/camera/camera/README.md @@ -47,7 +47,7 @@ It's important to note that the `MediaRecorder` class is not working properly on ### Handling Lifecycle states -As of version [0.5.0](https://github.com/flutter/plugins/blob/master/packages/camera/CHANGELOG.md#050) of the camera plugin, lifecycle changes are no longer handled by the plugin. This means developers are now responsible to control camera resources when the lifecycle state is updated. Failure to do so might lead to unexpected behavior (for example as described in issue [#39109](https://github.com/flutter/flutter/issues/39109)). Handling lifecycle changes can be done by overriding the `didChangeAppLifecycleState` method like so: +As of version [0.5.0](https://github.com/flutter/plugins/blob/master/packages/camera/camera/CHANGELOG.md#050) of the camera plugin, lifecycle changes are no longer handled by the plugin. This means developers are now responsible to control camera resources when the lifecycle state is updated. Failure to do so might lead to unexpected behavior (for example as described in issue [#39109](https://github.com/flutter/flutter/issues/39109)). Handling lifecycle changes can be done by overriding the `didChangeAppLifecycleState` method like so: ```dart @override @@ -66,6 +66,16 @@ As of version [0.5.0](https://github.com/flutter/plugins/blob/master/packages/ca } ``` +As of version [0.6.5](https://github.com/flutter/plugins/blob/master/packages/camera/camera/CHANGELOG.md#065) the startVideoRecording method can be used with the maxVideoDuration parameter. To do this the result of the recording needs to be retrieved by listening to controller.onVideoRecordedEvent which yields a VideoRecordedEvent when the recording is finished. Like so: +```dart +recordVideo() async { + controller.onVideoRecordedEvent().listen((VideoRecordedEvent event) { + // Handle VideoRecordedEvent + }); + await controller.startVideoRecording(maxVideoDuration: const Duration(seconds: 5)); +} +``` + ### Example Here is a small example flutter app displaying a full screen camera preview. diff --git a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java index 1b6cce95d08c..fb4f649b6048 100644 --- a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java +++ b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java @@ -4,6 +4,7 @@ package io.flutter.plugins.camera; +import static android.media.MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED; import static io.flutter.plugins.camera.CameraUtils.computeBestPreviewSize; import android.annotation.SuppressLint; @@ -105,6 +106,7 @@ public class Camera { private boolean useAutoFocus = true; private Range fpsRange; private PlatformChannel.DeviceOrientation lockedCaptureOrientation; + private Integer maxDurationLimit; private static final HashMap supportedImageFormats; // Current supported outputs @@ -178,19 +180,24 @@ private void initFps(CameraCharacteristics cameraCharacteristics) { Log.i("Camera", "[FPS Range] is:" + fpsRange); } - private void prepareMediaRecorder(String outputFilePath) throws IOException { + private void prepareMediaRecorder(String outputFilePath, Integer maxVideoDuration) throws IOException { if (mediaRecorder != null) { mediaRecorder.release(); } - mediaRecorder = + MediaRecorderBuilder mediaRecorderBuilder = new MediaRecorderBuilder(recordingProfile, outputFilePath) .setEnableAudio(enableAudio) .setMediaOrientation( lockedCaptureOrientation == null ? deviceOrientationListener.getMediaOrientation() : deviceOrientationListener.getMediaOrientation(lockedCaptureOrientation)) - .build(); + .setMediaOrientation(getMediaOrientation()); + + if (maxVideoDuration != null) { + mediaRecorderBuilder.setMaxVideoDuration(maxVideoDuration); + } + mediaRecorder = mediaRecorderBuilder.build(); } @SuppressLint("MissingPermission") @@ -609,8 +616,9 @@ private void unlockAutoFocus() { (errorCode, errorMessage) -> pictureCaptureRequest.error(errorCode, errorMessage, null)); } - public void startVideoRecording(Result result) { + public void startVideoRecording(Result result, Integer maxVideoDuration) { final File outputDir = applicationContext.getCacheDir(); + maxDurationLimit = maxVideoDuration; try { videoRecordingFile = File.createTempFile("REC", ".mp4", outputDir); } catch (IOException | SecurityException e) { @@ -619,10 +627,27 @@ public void startVideoRecording(Result result) { } try { - prepareMediaRecorder(videoRecordingFile.getAbsolutePath()); + prepareMediaRecorder(videoRecordingFile.getAbsolutePath(), maxVideoDuration); recordingVideo = true; createCaptureSession( CameraDevice.TEMPLATE_RECORD, () -> mediaRecorder.start(), mediaRecorder.getSurface()); + if (maxVideoDuration != null) { + mediaRecorder.setOnInfoListener( + (mr, what, extra) -> { + if (what == MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) { + try { + dartMessenger.sendVideoRecordedEvent( + videoRecordingFile.getAbsolutePath(), maxVideoDuration); + recordingVideo = false; + videoRecordingFile = null; + maxDurationLimit = null; + resetCaptureSession(); + } catch (CameraAccessException e) { + result.error("videoRecordingFailed", e.getMessage(), null); + } + } + }); + } result.success(null); } catch (CameraAccessException | IOException e) { recordingVideo = false; @@ -631,6 +656,19 @@ public void startVideoRecording(Result result) { } } + public void resetCaptureSession() throws CameraAccessException { + try { + cameraCaptureSession.abortCaptures(); + mediaRecorder.stop(); + } catch (IllegalStateException e) { + // Ignore exceptions and try to continue (chances are camera session already aborted capture) + } + + mediaRecorder.reset(); + startPreview(); + } + + public void stopVideoRecording(@NonNull final Result result) { if (!recordingVideo) { result.success(null); @@ -639,19 +677,12 @@ public void stopVideoRecording(@NonNull final Result result) { try { recordingVideo = false; - - try { - cameraCaptureSession.abortCaptures(); - mediaRecorder.stop(); - } catch (CameraAccessException | IllegalStateException e) { - // Ignore exceptions and try to continue (changes are camera session already aborted capture) - } - - mediaRecorder.reset(); - startPreview(); + resetCaptureSession(); + dartMessenger.sendVideoRecordedEvent(videoRecordingFile.getAbsolutePath(), maxDurationLimit); + maxDurationLimit = null; result.success(videoRecordingFile.getAbsolutePath()); videoRecordingFile = null; - } catch (CameraAccessException | IllegalStateException e) { + } catch (CameraAccessException e) { result.error("videoRecordingFailed", e.getMessage(), null); } } diff --git a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/DartMessenger.java b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/DartMessenger.java index 3892452892d9..5c1a14e0769b 100644 --- a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/DartMessenger.java +++ b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/DartMessenger.java @@ -32,7 +32,8 @@ enum DeviceEventType { enum CameraEventType { ERROR("error"), CLOSING("camera_closing"), - INITIALIZED("initialized"); + INITIALIZED("initialized"), + VIDEO_RECORDED("video_recorded"); private final String method; @@ -98,6 +99,17 @@ void sendCameraErrorEvent(@Nullable String description) { }); } + void sendVideoRecordedEvent(String path, Integer maxVideoDuration) { + this.send( + CameraEventType.VIDEO_RECORDED, + new HashMap() { + { + if (path != null) put("path", path); + if (maxVideoDuration != null) put("maxVideoDuration", maxVideoDuration); + } + }); + } + void send(CameraEventType eventType) { send(eventType, new HashMap<>()); } diff --git a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/MethodCallHandlerImpl.java b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/MethodCallHandlerImpl.java index aa7483f55679..e1d16aee89dc 100644 --- a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/MethodCallHandlerImpl.java +++ b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/MethodCallHandlerImpl.java @@ -112,7 +112,7 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull final Result result) } case "startVideoRecording": { - camera.startVideoRecording(result); + camera.startVideoRecording(result, call.argument("maxVideoDuration")); break; } case "stopVideoRecording": diff --git a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java index 4c3fb3add230..50214d10db32 100644 --- a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java +++ b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java @@ -22,6 +22,7 @@ MediaRecorder makeMediaRecorder() { private boolean enableAudio; private int mediaOrientation; + private int maxVideoDuration; public MediaRecorderBuilder( @NonNull CamcorderProfile recordingProfile, @NonNull String outputFilePath) { @@ -47,6 +48,11 @@ public MediaRecorderBuilder setMediaOrientation(int orientation) { return this; } + public MediaRecorderBuilder setMaxVideoDuration(int maxVideoDuration) { + this.maxVideoDuration = maxVideoDuration; + return this; + } + public MediaRecorder build() throws IOException { MediaRecorder mediaRecorder = recorderFactory.makeMediaRecorder(); @@ -67,6 +73,8 @@ public MediaRecorder build() throws IOException { mediaRecorder.setOutputFile(outputFilePath); mediaRecorder.setOrientationHint(this.mediaOrientation); + mediaRecorder.setMaxDuration(maxVideoDuration); + mediaRecorder.prepare(); return mediaRecorder; diff --git a/packages/camera/camera/example/lib/main.dart b/packages/camera/camera/example/lib/main.dart index 6244aa5a8e37..c9890e1e2d3e 100644 --- a/packages/camera/camera/example/lib/main.dart +++ b/packages/camera/camera/example/lib/main.dart @@ -726,7 +726,8 @@ class _CameraExampleHomeState extends State } try { - await controller.startVideoRecording(); + await controller.startVideoRecording( + maxVideoDuration: Duration(seconds: 5)); } on CameraException catch (e) { _showCameraException(e); return; diff --git a/packages/camera/camera/ios/Classes/CameraPlugin.m b/packages/camera/camera/ios/Classes/CameraPlugin.m index d97ce88a58d8..2a5732a0012d 100644 --- a/packages/camera/camera/ios/Classes/CameraPlugin.m +++ b/packages/camera/camera/ios/Classes/CameraPlugin.m @@ -782,7 +782,8 @@ - (CVPixelBufferRef)copyPixelBuffer { return pixelBuffer; } -- (void)startVideoRecordingWithResult:(FlutterResult)result { +- (void)startVideoRecordingWithResult:(FlutterResult)result + maxVideoDuration:(int64_t)maxVideoDuration { if (!_isRecording) { NSError *error; _videoRecordingPath = [self getTemporaryFilePathWithExtension:@"mp4" @@ -797,6 +798,14 @@ - (void)startVideoRecordingWithResult:(FlutterResult)result { result([FlutterError errorWithCode:@"IOError" message:@"Setup Writer Failed" details:nil]); return; } + if (maxVideoDuration != 0) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(maxVideoDuration * NSEC_PER_MSEC)), + dispatch_get_main_queue(), ^{ + if (self->_isRecording) { + [self stopVideoRecordingWithResult:nil maxVideoRecording:maxVideoDuration]; + } + }); + } _isRecording = YES; _isRecordingPaused = NO; _videoTimeOffset = CMTimeMake(0, 1); @@ -809,18 +818,30 @@ - (void)startVideoRecordingWithResult:(FlutterResult)result { } } -- (void)stopVideoRecordingWithResult:(FlutterResult)result { +- (void)stopVideoRecordingWithResult:(FlutterResult)result +maxVideoDuration:(int64_t)maxVideoDuration { if (_isRecording) { _isRecording = NO; if (_videoWriter.status != AVAssetWriterStatusUnknown) { [_videoWriter finishWritingWithCompletionHandler:^{ if (self->_videoWriter.status == AVAssetWriterStatusCompleted) { - result(self->_videoRecordingPath); + if(result != nil) { + result(self->_videoRecordingPath); + } + [self->_methodChannel invokeMethod:@"video_recorded" + arguments:@{ + @"path" : self->_videoRecordingPath, + @"maxVideoDuration" : @(maxVideoDuration), + }]; self->_videoRecordingPath = nil; } else { - result([FlutterError errorWithCode:@"IOError" + if(result != nil) { + result([FlutterError errorWithCode:@"IOError" message:@"AVAssetWriter could not finish writing!" details:nil]); + } + [self->_methodChannel invokeMethod:errorMethod + arguments:@"AVAssetWriter could not finish writing!"]; } }]; } @@ -829,7 +850,9 @@ - (void)stopVideoRecordingWithResult:(FlutterResult)result { [NSError errorWithDomain:NSCocoaErrorDomain code:NSURLErrorResourceUnavailable userInfo:@{NSLocalizedDescriptionKey : @"Video is not recording!"}]; - result(getFlutterError(error)); +if(result != nil){ result(getFlutterError(error)); +} [self->_methodChannel invokeMethod:errorMethod arguments:@"Video is not recording!"]; + } } @@ -1385,7 +1408,13 @@ - (void)handleMethodCallAsync:(FlutterMethodCall *)call result:(FlutterResult)re [_camera setUpCaptureSessionForAudio]; result(nil); } else if ([@"startVideoRecording" isEqualToString:call.method]) { - [_camera startVideoRecordingWithResult:result]; + if ([call.arguments[@"maxVideoDuration"] class] != [NSNull class]) { + [_camera startVideoRecordingWithResult:result + maxVideoDuration:((NSNumber *)call.arguments[@"maxVideoDuration"]) + .intValue]; + } else { + [_camera startVideoRecordingWithResult:result maxVideoDuration:0]; + } } else if ([@"stopVideoRecording" isEqualToString:call.method]) { [_camera stopVideoRecordingWithResult:result]; } else if ([@"pauseVideoRecording" isEqualToString:call.method]) { diff --git a/packages/camera/camera/lib/camera.dart b/packages/camera/camera/lib/camera.dart index d6e32affdd7a..d33ba5fd03dd 100644 --- a/packages/camera/camera/lib/camera.dart +++ b/packages/camera/camera/lib/camera.dart @@ -11,6 +11,7 @@ export 'package:camera_platform_interface/camera_platform_interface.dart' CameraDescription, CameraException, CameraLensDirection, + VideoRecordedEvent, FlashMode, ExposureMode, FocusMode, diff --git a/packages/camera/camera/lib/src/camera_controller.dart b/packages/camera/camera/lib/src/camera_controller.dart index 80e83c867954..86b48bdccee2 100644 --- a/packages/camera/camera/lib/src/camera_controller.dart +++ b/packages/camera/camera/lib/src/camera_controller.dart @@ -430,7 +430,7 @@ class CameraController extends ValueNotifier { /// /// The video is returned as a [XFile] after calling [stopVideoRecording]. /// Throws a [CameraException] if the capture fails. - Future startVideoRecording() async { + Future startVideoRecording({Duration maxVideoDuration}) async { _throwIfNotInitialized("startVideoRecording"); if (value.isRecordingVideo) { throw CameraException( @@ -446,12 +446,19 @@ class CameraController extends ValueNotifier { } try { - await CameraPlatform.instance.startVideoRecording(_cameraId); + await CameraPlatform.instance.startVideoRecording( + _cameraId, + maxVideoDuration: maxVideoDuration, + ); value = value.copyWith( isRecordingVideo: true, isRecordingPaused: false, recordingOrientation: Optional.fromNullable( value.lockedCaptureOrientation ?? value.deviceOrientation)); + // Listen for VideoRecordedEvent to reset isRecordingVideo + CameraPlatform.instance.onVideoRecordedEvent(_cameraId).listen((event) { + value = value.copyWith(isRecordingVideo: false); + }); } on PlatformException catch (e) { throw CameraException(e.code, e.message); } @@ -518,6 +525,19 @@ class CameraController extends ValueNotifier { } } + /// Stream yielding a [VideoRecordedEvent] every time a video stops recording + Stream onVideoRecordedEvent() { + if (!value.isInitialized || _isDisposed) { + throw CameraException( + 'Uninitialized CameraController', + 'cameraTimeLimitReachedEventStream was called on uninitialized CameraController', + ); + } + return CameraPlatform.instance + .onVideoRecordedEvent(_cameraId) + .asBroadcastStream(); + } + /// Returns a widget showing a live camera preview. Widget buildPreview() { _throwIfNotInitialized("buildPreview"); diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index 2b6d163dfbeb..6e4f280c48cc 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -2,13 +2,14 @@ name: camera description: A Flutter plugin for getting information about and controlling the camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video, and streaming image buffers to dart. -version: 0.7.0+2 +version: 0.7.1 homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera dependencies: flutter: sdk: flutter - camera_platform_interface: ^1.5.0 + camera_platform_interface: #^1.5.0 + path: ../camera_platform_interface pedantic: ^1.8.0 quiver: ^2.1.5 From cb0ca25cefa1481133d547e78a21e4b6c85fccde Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 15:29:36 +0100 Subject: [PATCH 12/18] Removed extra setMediaOrientation --- .../src/main/java/io/flutter/plugins/camera/Camera.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java index fb4f649b6048..f684645a320c 100644 --- a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java +++ b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java @@ -191,8 +191,7 @@ private void prepareMediaRecorder(String outputFilePath, Integer maxVideoDuratio .setMediaOrientation( lockedCaptureOrientation == null ? deviceOrientationListener.getMediaOrientation() - : deviceOrientationListener.getMediaOrientation(lockedCaptureOrientation)) - .setMediaOrientation(getMediaOrientation()); + : deviceOrientationListener.getMediaOrientation(lockedCaptureOrientation)); if (maxVideoDuration != null) { mediaRecorderBuilder.setMaxVideoDuration(maxVideoDuration); From d204c6e701e2d4ecebb819760cd5a2d820cd82ff Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 15:47:30 +0100 Subject: [PATCH 13/18] updated version in README.md --- packages/camera/camera/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/camera/camera/README.md b/packages/camera/camera/README.md index 22848cf822c1..d1364864c99d 100644 --- a/packages/camera/camera/README.md +++ b/packages/camera/camera/README.md @@ -66,7 +66,7 @@ As of version [0.5.0](https://github.com/flutter/plugins/blob/master/packages/ca } ``` -As of version [0.6.5](https://github.com/flutter/plugins/blob/master/packages/camera/camera/CHANGELOG.md#065) the startVideoRecording method can be used with the maxVideoDuration parameter. To do this the result of the recording needs to be retrieved by listening to controller.onVideoRecordedEvent which yields a VideoRecordedEvent when the recording is finished. Like so: +As of version [0.7.1](https://github.com/flutter/plugins/blob/master/packages/camera/camera/CHANGELOG.md#071) the startVideoRecording method can be used with the maxVideoDuration parameter. To do this the result of the recording needs to be retrieved by listening to controller.onVideoRecordedEvent which yields a VideoRecordedEvent when the recording is finished. Like so: ```dart recordVideo() async { controller.onVideoRecordedEvent().listen((VideoRecordedEvent event) { From 63a95341adfe8245aa47f2faa345056b868249ab Mon Sep 17 00:00:00 2001 From: Daniel Roek Date: Fri, 5 Feb 2021 16:12:19 +0100 Subject: [PATCH 14/18] Fixed formatting and iOS implementation --- .../io/flutter/plugins/camera/Camera.java | 32 +++++----- .../flutter/plugins/camera/DartMessenger.java | 14 ++--- .../camera/camera/ios/Classes/CameraPlugin.m | 61 ++++++++++--------- 3 files changed, 54 insertions(+), 53 deletions(-) diff --git a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java index f684645a320c..8e45771f4b99 100644 --- a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java +++ b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java @@ -180,7 +180,8 @@ private void initFps(CameraCharacteristics cameraCharacteristics) { Log.i("Camera", "[FPS Range] is:" + fpsRange); } - private void prepareMediaRecorder(String outputFilePath, Integer maxVideoDuration) throws IOException { + private void prepareMediaRecorder(String outputFilePath, Integer maxVideoDuration) + throws IOException { if (mediaRecorder != null) { mediaRecorder.release(); } @@ -632,20 +633,20 @@ public void startVideoRecording(Result result, Integer maxVideoDuration) { CameraDevice.TEMPLATE_RECORD, () -> mediaRecorder.start(), mediaRecorder.getSurface()); if (maxVideoDuration != null) { mediaRecorder.setOnInfoListener( - (mr, what, extra) -> { - if (what == MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) { - try { - dartMessenger.sendVideoRecordedEvent( - videoRecordingFile.getAbsolutePath(), maxVideoDuration); - recordingVideo = false; - videoRecordingFile = null; - maxDurationLimit = null; - resetCaptureSession(); - } catch (CameraAccessException e) { - result.error("videoRecordingFailed", e.getMessage(), null); - } - } - }); + (mr, what, extra) -> { + if (what == MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) { + try { + dartMessenger.sendVideoRecordedEvent( + videoRecordingFile.getAbsolutePath(), maxVideoDuration); + recordingVideo = false; + videoRecordingFile = null; + maxDurationLimit = null; + resetCaptureSession(); + } catch (CameraAccessException e) { + result.error("videoRecordingFailed", e.getMessage(), null); + } + } + }); } result.success(null); } catch (CameraAccessException | IOException e) { @@ -667,7 +668,6 @@ public void resetCaptureSession() throws CameraAccessException { startPreview(); } - public void stopVideoRecording(@NonNull final Result result) { if (!recordingVideo) { result.success(null); diff --git a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/DartMessenger.java b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/DartMessenger.java index 5c1a14e0769b..2769b40e2c99 100644 --- a/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/DartMessenger.java +++ b/packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/DartMessenger.java @@ -101,13 +101,13 @@ void sendCameraErrorEvent(@Nullable String description) { void sendVideoRecordedEvent(String path, Integer maxVideoDuration) { this.send( - CameraEventType.VIDEO_RECORDED, - new HashMap() { - { - if (path != null) put("path", path); - if (maxVideoDuration != null) put("maxVideoDuration", maxVideoDuration); - } - }); + CameraEventType.VIDEO_RECORDED, + new HashMap() { + { + if (path != null) put("path", path); + if (maxVideoDuration != null) put("maxVideoDuration", maxVideoDuration); + } + }); } void send(CameraEventType eventType) { diff --git a/packages/camera/camera/ios/Classes/CameraPlugin.m b/packages/camera/camera/ios/Classes/CameraPlugin.m index 2a5732a0012d..dddfa4457517 100644 --- a/packages/camera/camera/ios/Classes/CameraPlugin.m +++ b/packages/camera/camera/ios/Classes/CameraPlugin.m @@ -783,7 +783,7 @@ - (CVPixelBufferRef)copyPixelBuffer { } - (void)startVideoRecordingWithResult:(FlutterResult)result - maxVideoDuration:(int64_t)maxVideoDuration { + maxVideoDuration:(int64_t)maxVideoDuration { if (!_isRecording) { NSError *error; _videoRecordingPath = [self getTemporaryFilePathWithExtension:@"mp4" @@ -798,14 +798,14 @@ - (void)startVideoRecordingWithResult:(FlutterResult)result result([FlutterError errorWithCode:@"IOError" message:@"Setup Writer Failed" details:nil]); return; } - if (maxVideoDuration != 0) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(maxVideoDuration * NSEC_PER_MSEC)), - dispatch_get_main_queue(), ^{ - if (self->_isRecording) { - [self stopVideoRecordingWithResult:nil maxVideoRecording:maxVideoDuration]; - } - }); - } + if (maxVideoDuration != 0) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(maxVideoDuration * NSEC_PER_MSEC)), + dispatch_get_main_queue(), ^{ + if (self->_isRecording) { + [self stopVideoRecordingWithResult:nil maxVideoDuration:maxVideoDuration]; + } + }); + } _isRecording = YES; _isRecordingPaused = NO; _videoTimeOffset = CMTimeMake(0, 1); @@ -819,26 +819,26 @@ - (void)startVideoRecordingWithResult:(FlutterResult)result } - (void)stopVideoRecordingWithResult:(FlutterResult)result -maxVideoDuration:(int64_t)maxVideoDuration { + maxVideoDuration:(int64_t)maxVideoDuration { if (_isRecording) { _isRecording = NO; if (_videoWriter.status != AVAssetWriterStatusUnknown) { [_videoWriter finishWritingWithCompletionHandler:^{ if (self->_videoWriter.status == AVAssetWriterStatusCompleted) { - if(result != nil) { + if (result != nil) { result(self->_videoRecordingPath); } - [self->_methodChannel invokeMethod:@"video_recorded" - arguments:@{ - @"path" : self->_videoRecordingPath, - @"maxVideoDuration" : @(maxVideoDuration), - }]; + [self->_methodChannel invokeMethod:@"video_recorded" + arguments:@{ + @"path" : self->_videoRecordingPath, + @"maxVideoDuration" : @(maxVideoDuration), + }]; self->_videoRecordingPath = nil; } else { - if(result != nil) { + if (result != nil) { result([FlutterError errorWithCode:@"IOError" - message:@"AVAssetWriter could not finish writing!" - details:nil]); + message:@"AVAssetWriter could not finish writing!" + details:nil]); } [self->_methodChannel invokeMethod:errorMethod arguments:@"AVAssetWriter could not finish writing!"]; @@ -850,9 +850,10 @@ - (void)stopVideoRecordingWithResult:(FlutterResult)result [NSError errorWithDomain:NSCocoaErrorDomain code:NSURLErrorResourceUnavailable userInfo:@{NSLocalizedDescriptionKey : @"Video is not recording!"}]; -if(result != nil){ result(getFlutterError(error)); -} [self->_methodChannel invokeMethod:errorMethod arguments:@"Video is not recording!"]; - + if (result != nil) { + result(getFlutterError(error)); + } + [self->_methodChannel invokeMethod:errorMethod arguments:@"Video is not recording!"]; } } @@ -1408,15 +1409,15 @@ - (void)handleMethodCallAsync:(FlutterMethodCall *)call result:(FlutterResult)re [_camera setUpCaptureSessionForAudio]; result(nil); } else if ([@"startVideoRecording" isEqualToString:call.method]) { - if ([call.arguments[@"maxVideoDuration"] class] != [NSNull class]) { - [_camera startVideoRecordingWithResult:result - maxVideoDuration:((NSNumber *)call.arguments[@"maxVideoDuration"]) - .intValue]; - } else { - [_camera startVideoRecordingWithResult:result maxVideoDuration:0]; - } + if ([call.arguments[@"maxVideoDuration"] class] != [NSNull class]) { + [_camera startVideoRecordingWithResult:result + maxVideoDuration:((NSNumber *)call.arguments[@"maxVideoDuration"]) + .intValue]; + } else { + [_camera startVideoRecordingWithResult:result maxVideoDuration:0]; + } } else if ([@"stopVideoRecording" isEqualToString:call.method]) { - [_camera stopVideoRecordingWithResult:result]; + [_camera stopVideoRecordingWithResult:result maxVideoDuration:0]; } else if ([@"pauseVideoRecording" isEqualToString:call.method]) { [_camera pauseVideoRecordingWithResult:result]; } else if ([@"resumeVideoRecording" isEqualToString:call.method]) { From e1a70fe6cfbfe0497cad1ec09b64b7f8f7468d13 Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 16:15:45 +0100 Subject: [PATCH 15/18] fixed publishable --- packages/camera/camera/pubspec.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index 6e4f280c48cc..7831a2840c1b 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -8,8 +8,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera dependencies: flutter: sdk: flutter - camera_platform_interface: #^1.5.0 - path: ../camera_platform_interface + camera_platform_interface: ^1.5.0 pedantic: ^1.8.0 quiver: ^2.1.5 From 263c44e08474232a79655540494ecbc978c4696b Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Fri, 5 Feb 2021 16:28:08 +0100 Subject: [PATCH 16/18] Updated pubspec.yaml --- packages/camera/camera/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index 7831a2840c1b..88a43c66d280 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -8,7 +8,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera dependencies: flutter: sdk: flutter - camera_platform_interface: ^1.5.0 + camera_platform_interface: ^1.5.1 pedantic: ^1.8.0 quiver: ^2.1.5 From f14dddda99741235c03e4ef1e7a5dab8f37ea445 Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Wed, 10 Feb 2021 10:44:28 +0100 Subject: [PATCH 17/18] Updated version --- packages/camera/camera/CHANGELOG.md | 4 ++++ packages/camera/camera/example/lib/main.dart | 2 +- packages/camera/camera/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/camera/camera/CHANGELOG.md b/packages/camera/camera/CHANGELOG.md index 622bd095b021..34f603957ada 100644 --- a/packages/camera/camera/CHANGELOG.md +++ b/packages/camera/camera/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.1 + +* Implemented option to provide a maxVideoDuration to limit a video recording in time. + ## 0.7.0+3 * Clockwise rotation of focus point in android diff --git a/packages/camera/camera/example/lib/main.dart b/packages/camera/camera/example/lib/main.dart index c9890e1e2d3e..9824d8d9588f 100644 --- a/packages/camera/camera/example/lib/main.dart +++ b/packages/camera/camera/example/lib/main.dart @@ -727,7 +727,7 @@ class _CameraExampleHomeState extends State try { await controller.startVideoRecording( - maxVideoDuration: Duration(seconds: 5)); + maxVideoDuration: null); } on CameraException catch (e) { _showCameraException(e); return; diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index cebbb334c8f2..7831a2840c1b 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -2,7 +2,7 @@ name: camera description: A Flutter plugin for getting information about and controlling the camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video, and streaming image buffers to dart. -version: 0.7.0+3 +version: 0.7.1 homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera dependencies: From 9c796e76694d97aacc5fc59e71d25cd53ac4272d Mon Sep 17 00:00:00 2001 From: "daniel.roek" Date: Wed, 10 Feb 2021 11:51:50 +0100 Subject: [PATCH 18/18] Updated version --- packages/camera/camera/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index 7831a2840c1b..888ede2beae6 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -8,7 +8,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera dependencies: flutter: sdk: flutter - camera_platform_interface: ^1.5.0 + camera_platform_interface: ^1.6.0 pedantic: ^1.8.0 quiver: ^2.1.5