resolveSingle static method

Widget? resolveSingle(
  1. WidgetEntry entry, {
  2. ColorScheme? hostColorScheme,
})

Resolve a single widget entry.

Implementation

static Widget? resolveSingle(
  WidgetEntry entry, {
  ColorScheme? hostColorScheme,
}) {
  final child = WidgetRegistry.build(entry.type, entry.params);
  if (child == null) return null;

  final effectiveColorScheme =
      entry.common.colorScheme ?? hostColorScheme;

  return ResponsiveWidgetWrapper(
    layout: entry.common.layout,
    themeOverride: entry.common.themeOverride,
    colorScheme: effectiveColorScheme,
    child: child,
  );
}