-
Notifications
You must be signed in to change notification settings - Fork 9
Updated platform interface to have recording methods return XFile instances #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated platform interface to have recording methods return XFile instances #9
Conversation
@@ -67,7 +68,7 @@ abstract class CameraPlatform extends PlatformInterface { | |||
} | |||
|
|||
/// Captures an image and saves it to [path]. |
There was a problem hiding this comment.
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:
/// Captures an image and saves it to [path]. | |
/// Captures an image and returns it as a `XFile`. |
@@ -76,20 +78,19 @@ abstract class CameraPlatform extends PlatformInterface { | |||
throw UnimplementedError('prepareForVideoRecording() is not implemented.'); | |||
} | |||
|
|||
/// Start a video recording and save the file to [path]. | |||
/// Starts a video recording |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: missing a . after the sentence:
/// Starts a video recording | |
/// Starts a video recording. |
/// | ||
/// A path can for example be obtained using | ||
/// [path_provider](https://pub.dartlang.org/packages/path_provider). | ||
/// If no [file] parameter is provided, the recording will be saved to a new file in a temporary location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: wrap the documentation at 80 characters.
/// If no [file] parameter is provided, the recording will be saved to a new file in a temporary location. | |
/// If no [file] parameter is provided, the recording will be saved to a new | |
/// file in a temporary location. |
/// If a file already exists at the path for the provided file instance, an error will be thrown. | ||
/// The file can be read as soon as [stopVideoRecording] returns it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Wrap the documentation at 80 characters:
/// If a file already exists at the path for the provided file instance, an error will be thrown. | |
/// The file can be read as soon as [stopVideoRecording] returns it. | |
/// If a file already exists at the path for the provided file instance, an | |
/// error will be thrown. | |
/// The file can be read as soon as [stopVideoRecording] returns it. |
packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart
Outdated
Show resolved
Hide resolved
packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart
Show resolved
Hide resolved
…erface/camera_platform.dart Co-authored-by: Maurits van Beusekom <[email protected]>
…erface/camera_platform.dart Co-authored-by: Maurits van Beusekom <[email protected]>
file_selector_platform_interface
dependency. To be changed later whencross_file
PR is merged.