initState method

void initState(
  1. String key,
  2. dynamic initialValue
)

Implementation

void initState(String key, dynamic initialValue) {
  if (key == "#init") {
    throw Exception("You can't update #init");
  }
  if (initialValue == null) {
    throw Exception("initialValue can't be null");
  }
  if (__globalState.containsKey(key)) {
    return;
  }
  __globalState = {...__globalState, key: initialValue, "#init": key};
}