flame-engine/flame

`ComponentRenderContext` is not exported while the document suggesting it is public.

Closed this issue · 1 comments

What happened?

In the document of Component, it is suggested that user should be able to subclass and provide their own ComponentRenderContext, however this class is not exported, and users would need to directly import from 'src/components/core/component_render_context.dart' to used it.

/// Override this method if you want your component to provide a custom
/// render context to all its children (recursively).
ComponentRenderContext? get renderContext => null;

T? findRenderContext<T extends ComponentRenderContext>() {
  return _renderContexts.whereType<T>().lastOrNull;
}

What do you expect?

If this class is considered internal, the document shouldn't suggest user to provide their own render context. Otherwise ComponentRenderContext should be exported somewhere outside src/

How can we reproduce this?

No response

What steps should take to fix this?

No response

Do have an example of where the bug occurs?

No response

Relevant log output

Execute in a terminal and put output into the code block below

Output of: flutter doctor -v

Affected platforms

All

Other information

No response

Are you interested in working on a PR for this?

  • I want to work on this

Thanks for your report, the fix will be released in the next version.