Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import 'dart:async';

import 'package:file_selector_platform_interface/file_selector_platform_interface.dart';
import 'package:flutter/widgets.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:camera_platform_interface/src/method_channel/method_channel_camera.dart';
Expand Down Expand Up @@ -67,7 +68,7 @@ abstract class CameraPlatform extends PlatformInterface {
}

/// Captures an image and saves it to [path].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to update the documentation. Maybe something like:

Suggested change
/// Captures an image and saves it to [path].
/// Captures an image and returns it as a `XFile`.

Future<void> takePicture(int cameraId, String path) {
Future<XFile> takePicture(int cameraId) {
throw UnimplementedError('takePicture() is not implemented.');
}

Expand All @@ -84,12 +85,12 @@ abstract class CameraPlatform extends PlatformInterface {
/// The file is written on the flight as the video is being recorded.
/// If a file already exists at the provided path an error will be thrown.
/// The file can be read as soon as [stopVideoRecording] returns.
Future<void> startVideoRecording(int cameraId, String path) {
Future<void> startVideoRecording(int cameraId) {
throw UnimplementedError('startVideoRecording() is not implemented.');
}

/// Stop the video recording.
Future<void> stopVideoRecording(int cameraId) {
Future<XFile> stopVideoRecording(int cameraId) {
throw UnimplementedError('stopVideoRecording() is not implemented.');
}

Expand Down
1 change: 1 addition & 0 deletions packages/camera/camera_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
sdk: flutter
meta: ^1.0.5
plugin_platform_interface: ^1.0.1
file_selector_platform_interface: ^1.0.0

dev_dependencies:
flutter_test:
Expand Down