Google celebrates Hispanic Heritage Month. See how.

stream method

*[<Null safety>](*

Stream<bool> stream ()

Listen for focus state events on the host viewRef. When listening, users will get the current focus state, followed by any future focus states. The returned stream instance should be cancelled whenever users are done listening to prevent memory leaks.

See //sdk/fidl/fuchsia.ui.views/view_ref_focused.fidl for additional documentation on what certain focus state transitions mean.


Stream<bool> stream() {
  late final StreamController<bool> controller;
  controller = StreamController<bool>(
    // ignore: unnecessary_lambdas
    onCancel: () => controller.close(),
  isFocused().then((state) => controller