Skip to content

Commit a2ec7a9

Browse files
authored
Update deprecated activeColor to activeThumbColor in Learn Flutter example code (#12691)
_Description of what this PR is changing or adding, and why:_ Replaces the deprecated `activeColor` property with `activeThumbColor` in Learn Flutter example code (https://docs.flutter.dev/get-started/fundamentals/user-input#switch) to help new Flutter developers learn current best practices and avoid using deprecated APIs. _Issues fixed by this PR (if any):_ #12690 _PRs or commits this PR depends on (if any):_ ## Presubmit checklist - [x] If you are unwilling, or unable, to sign the CLA, even for a _tiny_, one-word PR, please file an issue instead of a PR. - [ ] If this PR is not meant to land until a future stable release, mark it as draft with an explanation. - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style)—for example, it doesn't use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first-person pronouns). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
1 parent f39b6e3 commit a2ec7a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/get-started/fundamentals/user-input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ Widget build(BuildContext context) {
725725
return Switch(
726726
// This bool value toggles the switch.
727727
value: light,
728-
activeColor: Colors.red,
728+
activeThumbColor: Colors.red,
729729
onChanged: (bool value) {
730730
// This is called when the user toggles the switch.
731731
setState(() {

0 commit comments

Comments
 (0)