-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: Optional RenderManager #27
base: main
Are you sure you want to change the base?
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.
Looks good. It would be great if you add example of usage without manager in README.md
return; | ||
} | ||
|
||
renderObjects[id] = renderObject; |
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.
I think we have to throw some Exception instead of ignoring of add attempt
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.
This is a UI story.
I don't see the benefit of throwing exceptions. It's enough that the worst case will be null.
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.
Then it will be like this - you add something, but then you can't find it and you don't know why.
Maybe we just make this:
void updateRenderObject(T id, RenderMetricsBox renderObject)
from this:
void updateRenderObject(T id, RenderObject renderObject)
?
} | ||
|
||
/// Update an instance of [RenderObject] by [id]. | ||
@override | ||
void updateRenderObject(T id, RenderObject renderObject) { | ||
renderObjects[id] = renderObject as RenderMetricsBox; | ||
if (renderObject is! RenderMetricsBox) { |
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.
same here
Changes