LowderScreen constructor
LowderScreen(
- WidgetNodeSpec spec,
- Map initialState, {
- 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));
}
}