JsUiRenderContext class final
Rendering services and protocol converters available to components.
Constructors
- JsUiRenderContext({required JsUiNodeBuilder buildNode, required JsUiEventEnvelopeHandler onUiEvent, JsUiEventDispatcher? eventDispatcher, JsUiPathNodeBuilder? buildNodeAtPath, String path = '0', BuildContext? buildContext, JsUiCanvasSceneRegistry? canvasSceneRegistry, JsUiSnapshotRegistry? snapshotRegistry, JsUiPerformanceController? performanceController, JsUiFrameScheduler? frameScheduler, Uri? networkResourceBaseUri})
- Creates a render context for one structural node path.
Properties
- buildContext → BuildContext?
-
Flutter build context used to resolve theme tokens.
final
- canvasSceneRegistry → JsUiCanvasSceneRegistry
-
Registry for retained canvas scenes.
final
- frameScheduler → JsUiFrameScheduler
-
Scheduler shared by frame-driven components.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- networkResourceBaseUri → Uri?
-
Base URL used to resolve package-relative network resources.
final
- performanceController → JsUiPerformanceController
-
Adaptive quality and performance state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- snapshotRegistry → JsUiSnapshotRegistry
-
Registry for widgets addressable by snapshot components.
final
Methods
-
borderRadius(
Object? value) → BorderRadiusGeometry? - Resolves border radii and radius tokens.
-
boxDecoration(
Map< String, Object?> props) → BoxDecoration? - Resolves a container decoration and its design tokens.
-
build(
JsUiNode node) → Widget -
Builds
nodethrough the owning renderer. -
child(
JsUiNode node) → Widget? -
Builds the sole child of
node, or returnsnullwhen absent. -
childAt(
JsUiNode node, int index) → Widget - Builds one child while preserving its structural path.
-
children(
JsUiNode node) → List< Widget> - Builds all direct children while preserving their structural paths.
-
color(
Object? value) → Color? - Resolves a literal or themed color property.
-
dispatch(
Map< String, Object?> event, {Map<String, Object?> ? payload, String? defaultCoalesceKey, JsUiEventKind kind = JsUiEventKind.command}) → void - 将组件事件发送给页面。
-
edgeInsets(
Object? value) → EdgeInsetsGeometry? - Resolves edge insets and spacing tokens.
-
elevation(
Object? value, {String name = 'elevation'}) → double? - Resolves a literal value or elevation token.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
radius(
Object? value, {String name = 'radius'}) → double? - Resolves a literal value or radius token.
-
resource(
Object? value, {String name = 'resource'}) → JsUiResourceReference - Parses a resource and resolves relative network package paths.
-
slot(
JsUiNode node, String name) → Widget? -
Builds a named structural slot stored in
node.props. -
spacing(
Object? value, {String name = 'spacing'}) → double? - Resolves a literal value or spacing token.
-
textStyle(
Object? value) → TextStyle? - Resolves a literal or themed text style property.
-
toString(
) → String -
A string representation of this object.
inherited
-
withPath(
String path) → JsUiRenderContext -
Returns a context sharing services but using a different structural
path.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited