builder method
Implementation
Widget builder(BuildContext context, BaseState currentState) {
widget.log.infoWithContext(
"Building '$name' from state ${currentState.runtimeType}.",
Lowder.properties.getEvaluatorContext(null, state, null),
);
if (currentState is ReloadState || currentState is ReloadAll) {
_initialized = false;
_removePreviousValues();
widget._reloadController.add(null);
} else if (currentState is SetStateState) {
_removePreviousValues();
state.addAll(currentState.state);
if (currentState.reloadLists) {
widget._reloadController.add(null);
}
}
if (!_initialized) {
_initialized = true;
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
widget.initState(context);
});
}
return Form(
key: widget.formKey,
autovalidateMode: AutovalidateMode.disabled,
child: buildSpecBody(context, bodySpec),
);
}