Skip to content

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

Merged

Conversation

BeMacized
Copy link
Member

  • Currently imports XFile class from added file_selector_platform_interface dependency. To be changed later when cross_file PR is merged.

@@ -67,7 +68,7 @@ abstract class CameraPlatform extends PlatformInterface {
}

/// Captures an image and saves it to [path].
Copy link
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`.

@@ -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
Copy link
Member

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:

Suggested change
/// 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.
Copy link
Member

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.

Suggested change
/// 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.

Comment on lines 86 to 87
/// 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.
Copy link
Member

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:

Suggested change
/// 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.

BeMacized and others added 2 commits November 13, 2020 14:10
…erface/camera_platform.dart

Co-authored-by: Maurits van Beusekom <[email protected]>
…erface/camera_platform.dart

Co-authored-by: Maurits van Beusekom <[email protected]>
@mvanbeusekom mvanbeusekom merged commit 994e342 into camera_federated Nov 13, 2020
@mvanbeusekom mvanbeusekom deleted the subpr/camera_federated/platform-interface-xfile branch November 13, 2020 13:12
@mvanbeusekom mvanbeusekom restored the subpr/camera_federated/platform-interface-xfile branch November 13, 2020 13:12
@mvanbeusekom mvanbeusekom deleted the subpr/camera_federated/platform-interface-xfile branch November 13, 2020 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants