rebuild method

void rebuild()

Rebuild the widget

Implementation

void rebuild() async {
  final target = element.target;
  if (target == null) {
    dispose();
    return;
  }
  if (!target.mounted) return;

  if (SchedulerBinding.instance.schedulerPhase != SchedulerPhase.idle) {
    await SchedulerBinding.instance.endOfFrame;
    if (!target.mounted) return;
  }
  target.markNeedsBuild();
}