requestFocus method

*[<Null safety>](*
  • @override

Future<void> requestFocus ([int _ = 0])


Requests that focus be transferred to the remote Scene represented by this connection. This method is the point at which focus handling for flatland diverges. In Flatland, the Flutter engine holds the ViewRef and does not provide it to dart code, so we must refer to the child view by viewId instead


Future<void> requestFocus([int _ = 0]) async {
  if (useFlatland) {
    return super.requestFocusById(viewId);
  } else {
    assert(viewRef?.reference != null && _ == 0);
    return super.requestFocus(viewRef!.reference.handle!.handle);