Update onChange docs to Radio and RadioListTile

Added note that onChange callback will not be invoked if the radio is already selected
This commit is contained in:
K. P. Sroka 2019-04-27 04:36:22 +02:00 committed by Shi-Hao Hong
parent 26d7f502a9
commit 59f4e92b6e
2 changed files with 6 additions and 0 deletions

View File

@ -129,6 +129,9 @@ class Radio<T> extends StatefulWidget {
/// ///
/// If null, the radio button will be displayed as disabled. /// If null, the radio button will be displayed as disabled.
/// ///
/// The provided callback will not be invoked if this radio button is already
/// selected.
///
/// The callback provided to [onChanged] should update the state of the parent /// The callback provided to [onChanged] should update the state of the parent
/// [StatefulWidget] using the [State.setState] method, so that the parent /// [StatefulWidget] using the [State.setState] method, so that the parent
/// gets rebuilt; for example: /// gets rebuilt; for example:

View File

@ -129,6 +129,9 @@ class RadioListTile<T> extends StatelessWidget {
/// ///
/// If null, the radio button will be displayed as disabled. /// If null, the radio button will be displayed as disabled.
/// ///
/// The provided callback will not be invoked if this radio button is already
/// selected.
///
/// The callback provided to [onChanged] should update the state of the parent /// The callback provided to [onChanged] should update the state of the parent
/// [StatefulWidget] using the [State.setState] method, so that the parent /// [StatefulWidget] using the [State.setState] method, so that the parent
/// gets rebuilt; for example: /// gets rebuilt; for example: