Update FocusNode documentation (#126331)

## Description

This PR adds some details in FocusNode documentation to explain more precisely when listeners are notified.

## Related Issue

Fixes https://github.com/flutter/flutter/issues/126149

## Tests

Documentation only.
This commit is contained in:
Bruno Leroux 2023-05-09 17:50:51 +02:00 committed by GitHub
parent 58454e9e31
commit a800edfff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -298,7 +298,9 @@ enum UnfocusDisposition {
/// [ancestors] and [descendants] accessors. /// [ancestors] and [descendants] accessors.
/// ///
/// [FocusNode]s are [ChangeNotifier]s, so a listener can be registered to /// [FocusNode]s are [ChangeNotifier]s, so a listener can be registered to
/// receive a notification when the focus changes. If the [Focus] and /// receive a notification when the focus changes. Listeners will also be
/// notified when [skipTraversal], [canRequestFocus], [descendantsAreFocusable],
/// and [descendantsAreTraversable] properties are updated. If the [Focus] and
/// [FocusScope] widgets are being used to manage the nodes, consider /// [FocusScope] widgets are being used to manage the nodes, consider
/// establishing an [InheritedWidget] dependency on them by calling [Focus.of] /// establishing an [InheritedWidget] dependency on them by calling [Focus.of]
/// or [FocusScope.of] instead. [FocusNode.hasFocus] can also be used to /// or [FocusScope.of] instead. [FocusNode.hasFocus] can also be used to