buildSmallWidget method

BaseWidgetRender buildSmallWidget()

Builds a small widget instance.

Returns a BaseWidgetRender implementation for small widgets.

Implementation

BaseWidgetRender buildSmallWidget() {
  final widgetConfig = config.widgets.small;
  final style = styleManager.getStyleByName(widgetConfig.style);
  if (style == null) {
    throw Exception('Style "${widgetConfig.style}" not found');
  }

  return SmallWidget(
    config: widgetConfig,
    style: style,
    data: config.getInitialData(),
  );
}