updateExtra method

  1. @override
void updateExtra(
  1. TextRenderViewModel renderViewModel,
  2. Object updateExtra
)
override

Implementation

@override
void updateExtra(TextRenderViewModel renderViewModel, Object updateExtra) {
  if (updateExtra is TextExtra && updateExtra.extra is TextData) {
    renderViewModel.padding = EdgeInsets.only(
      left: updateExtra.leftPadding,
      top: updateExtra.topPadding,
      bottom: updateExtra.bottomPadding,
      right: updateExtra.rightPadding,
    );
    renderViewModel.data = updateExtra.extra as TextData;
    renderViewModel.update();
  } else if (updateExtra is TextData) {
    renderViewModel.data = updateExtra;
    renderViewModel.update();
  }
}