setBackgroundImage method

  1. @ControllerProps(NodeProps.kBackgroundImage)
void setBackgroundImage(
  1. T viewModel,
  2. Object? data
)

Implementation

@ControllerProps(NodeProps.kBackgroundImage)
void setBackgroundImage(T viewModel, Object? data) {
  if (data is String) {
    viewModel.backgroundImage = viewModel.context.convertRelativePath(viewModel.rootId, data);
  } else {
    viewModel.backgroundImage = data;
  }
}