createRenderViewModel method

  1. @override
ScrollViewRenderViewModel createRenderViewModel(
  1. RenderNode node,
  2. RenderContext<LoadInstanceContext> context
)
override

Implementation

@override
ScrollViewRenderViewModel createRenderViewModel(RenderNode node, RenderContext context) {
  var originProps = node.props;
  if (originProps != null &&
      originProps.containsKey("horizontal") &&
      originProps.get<bool>("horizontal") == true) {
    return ScrollViewRenderViewModel(node.id, node.rootId, node.name, context, true);
  }
  return ScrollViewRenderViewModel(node.id, node.rootId, node.name, context);
}