From 59f4e92b6eaf8380441a4fa4c5aa7b404efad545 Mon Sep 17 00:00:00 2001 From: "K. P. Sroka" Date: Sat, 27 Apr 2019 04:36:22 +0200 Subject: [PATCH] Update `onChange` docs to Radio and RadioListTile Added note that onChange callback will not be invoked if the radio is already selected --- packages/flutter/lib/src/material/radio.dart | 3 +++ packages/flutter/lib/src/material/radio_list_tile.dart | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/flutter/lib/src/material/radio.dart b/packages/flutter/lib/src/material/radio.dart index 09441b980a..d20a8785b7 100644 --- a/packages/flutter/lib/src/material/radio.dart +++ b/packages/flutter/lib/src/material/radio.dart @@ -129,6 +129,9 @@ class Radio extends StatefulWidget { /// /// 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 /// [StatefulWidget] using the [State.setState] method, so that the parent /// gets rebuilt; for example: diff --git a/packages/flutter/lib/src/material/radio_list_tile.dart b/packages/flutter/lib/src/material/radio_list_tile.dart index 7fb021e871..fae574cac6 100644 --- a/packages/flutter/lib/src/material/radio_list_tile.dart +++ b/packages/flutter/lib/src/material/radio_list_tile.dart @@ -129,6 +129,9 @@ class RadioListTile extends StatelessWidget { /// /// 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 /// [StatefulWidget] using the [State.setState] method, so that the parent /// gets rebuilt; for example: