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

feat: Optional RenderManager #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

knightsforce
Copy link

Changes

  • Optional render manager.
  • Added UI block in example.

Copy link

@Sadhorsephile Sadhorsephile left a 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;

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

Copy link
Author

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.

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) {

Choose a reason for hiding this comment

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

same here

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.

3 participants