useRef function

  1. @Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
GlobalKey<State<StatefulWidget>> useRef()

Creates a GlobalKey for a widget.

Note: This is part of the deprecated defineWidget API.

Implementation

@Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
GlobalKey useRef() {
  final key = GlobalKey();

  return key;
}