LowderScreen constructor

LowderScreen(
  1. WidgetNodeSpec spec,
  2. Map initialState, {
  3. Key? key,
})

Implementation

LowderScreen(this.spec, Map initialState, {super.key}) {
  // to avoid messing with the original object, copy it instead of using it as the screen state
  // eg: passing a selected element of a list as the state of a detail screen
  state.addAll(initialState);
  if (spec.props["state"] is Map) {
    state.addAll(spec.props["state"]);
  }
  if (Lowder.editorMode && initialState.isNotEmpty) {
    EditorBloc.addEvent(ScreenInitEvent(spec.id, state));
  }
}