Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit a5dc49f

Browse files
authored
Add assertion to _CupertinoSwitchRenderObjectWidget, otherwise it is confusing why updateRenderObject omits state update (#112044)
1 parent 31d03d5 commit a5dc49f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/flutter/lib/src/cupertino/switch.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ class _CupertinoSwitchRenderObjectWidget extends LeafRenderObjectWidget {
378378

379379
@override
380380
void updateRenderObject(BuildContext context, _RenderCupertinoSwitch renderObject) {
381+
assert(renderObject._state == state);
381382
renderObject
382383
..value = value
383384
..activeColor = activeColor

0 commit comments

Comments
 (0)