TextRenderViewModel.copy constructor

TextRenderViewModel.copy(
  1. int id,
  2. int instanceId,
  3. String className,
  4. RenderContext<LoadInstanceContext> context,
  5. TextRenderViewModel viewModel,
)

Implementation

TextRenderViewModel.copy(
  int id,
  int instanceId,
  String className,
  RenderContext context,
  TextRenderViewModel viewModel,
) : super.copy(id, instanceId, className, context, viewModel) {
  padding = viewModel.padding;
  var data = viewModel.data;
  if (data != null) {
    data = TextData(
      data.maxLines,
      data.text,
      data.textAlign,
      data.textScaleFactor,
      data.textOverflow,
    );
  }
}