getWidgetContext method

BuildContext? getWidgetContext(
  1. Widget newWidget
)

Implementation

BuildContext? getWidgetContext(Widget newWidget) {
  final oldChildIndex = domChildren?.indexWhere(
      (context) => context.widget.hashCode == newWidget.hashCode);

  if (oldChildIndex != -1 && oldChildIndex != null) {
    return domChildren![oldChildIndex];
  }
  return null;
}