didUpdateWidget method

void didUpdateWidget(
  1. covariant StatefulWidget oldWidget
)

Override this method to respond to when the StatefulWidget is recreated.

Implementation

void didUpdateWidget(covariant StatefulWidget oldWidget) {
  /// The framework always calls build() after calling [didUpdateWidget], which
  /// means any calls to [setState] in [didUpdateWidget] are redundant.
  // Record the triggered event
  assert(() {
    if (_debugPrintEvents) {
      debugPrint(
          '$_consoleLeadingLine didUpdateWidget() in $_consoleClassName');
    }
    return true;
  }());
}