Skip to content
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

[video_player] Added onScrubbingCallback to VideoProgressIndicator #6282

Closed

Conversation

pedrolemoz
Copy link

@pedrolemoz pedrolemoz commented Mar 7, 2024

This pull requests adds onScrubbingCallback to VideoProgressIndicator widget, as a nullable callback function.

Related issue: flutter/flutter#144777

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style].
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

Copy link
Contributor

@tarrinneal tarrinneal left a comment

Choose a reason for hiding this comment

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

A couple questions for ya.

packages/video_player/video_player/CHANGELOG.md Outdated Show resolved Hide resolved
@@ -31,6 +31,9 @@ VideoPlayerPlatform get _videoPlayerPlatform {
return currentInstance;
}

/// Signature of a callback that returns the current duration after scrubbing through the [VideoProgressIndicator].
typedef OnScrubbingCallback = void Function(Duration)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

if you're already making this optional on the classes it's used in, is it still necessary to do it here as well?

Copy link
Author

Choose a reason for hiding this comment

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

Adjusted

@tarrinneal
Copy link
Contributor

@stuartmorgan for second review

@stuartmorgan
Copy link
Contributor

Please see my comments in the issue about better understanding the use case. If this actually needs to be done at the level of the UI element, I'm not sure this is a sufficiently common use case to warrant being added to the package (vs. the application in question just implementing a custom seek bar).

@stuartmorgan stuartmorgan marked this pull request as draft April 5, 2024 10:57
@stuartmorgan
Copy link
Contributor

Marking as a draft pending resolution of the high-level goal/design discussion in the issue.

@stuartmorgan
Copy link
Contributor

Closing since the issue was auto-closed due to lack of update. If you decide to revisit this in the future, please feel free to file a new issue for discussion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants