-
-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Add onComplete callback and a newLineNotifier to TextBoxComponent and ScrollTextBoxComponent #3105
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.
Other than the naming it looks good!
Could you add a small test too?
packages/flame/lib/src/components/scroll_text_box_component.dart
Outdated
Show resolved
Hide resolved
@spydon |
You can create it in a new file with the name of the component, next to this one: Since your PR only covers |
ScrollTextBoxComponent makes use of newLinePositionNotifier change/add tests change docs
Correct test variable declaration
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 few minor comments, otherwise it looks good!
late final ValueNotifier<int> _newLineNotifier; | ||
|
||
ValueNotifier<int> get newLineNotifier => _newLineNotifier; |
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.
late final ValueNotifier<int> _newLineNotifier; | |
ValueNotifier<int> get newLineNotifier => _newLineNotifier; | |
late final ValueNotifier<int> newLineNotifier; |
It should be fine to have just this one
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.
Thanks, you're right :)
Description
Provides an
onComplete
callback to trigger actions after text is fully displayed. Furthermore adds a NotifiernewLineNotifier
for notifications when a new line starts.Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?
Related Issues
Fixes #3088