-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[video_player] Added onScrubbingCallback
to VideoProgressIndicator
#6282
Conversation
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.
A couple questions for ya.
@@ -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)?; |
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.
if you're already making this optional on the classes it's used in, is it still necessary to do it here as well?
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.
Adjusted
@stuartmorgan for second review |
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). |
Marking as a draft pending resolution of the high-level goal/design discussion in the issue. |
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! |
This pull requests adds
onScrubbingCallback
toVideoProgressIndicator
widget, as a nullable callback function.Related issue: flutter/flutter#144777
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style].///
).