onBuild method Null safety
- BuildContext context
Implementation
void onBuild(BuildContext context) {
bool? current = ModalRoute.of(context)?.isCurrent;
current ??= false;
this.isCurrent = current;
globals.elementInstances[this.widget.hashCode] =
globals.Elem(name: this.name, id: this.id, widget: this);
}