buildWidget method

Widget buildWidget(
  1. BuildContext context,
  2. Map widgetSpec,
  3. int i
)

Implementation

Widget buildWidget(BuildContext context, Map widgetSpec, int i) {
  // To keep Widget Keys unique:
  final specClone = widgetSpec.clone();
  specClone["_id"] = "${widgetSpec["_id"]}_$i";

  // 'entry' keys must exist in the state in order for the 'alias' property to work
  final entry = mutable.lastState.fullData[i];
  final stateClone = state.clone();
  if (entry is Map) {
    stateClone.addAll(entry);
  }

  return Lowder.widgets.buildWidget(context, specClone, stateClone,
      {"entry": entry, "idx": i, "parent": state});
}