convertToWidget method

Widget convertToWidget({
  1. required BuildContext context,
  2. D? source,
  3. required ElementBuilder<M, D> builder,
})

消费对象组件转换 context 视图上下文 source 原数据 builder 对象消费者构建器

Implementation

Widget convertToWidget({required BuildContext context, D? source, required ElementBuilder<M, D> builder}) {
  if (source != null) {
    builder.setSource(source);
  }
  builder.setModel(_model);
  builder.onBuildInit();
  var widget = builder.builder(context);
  builder.onBuildComplete();
  return widget;
}