diff --git a/examples/api/lib/material/radio/radio.1.dart b/examples/api/lib/material/radio/radio.1.dart index bffb1f04fb8..13bae7f1d3a 100644 --- a/examples/api/lib/material/radio/radio.1.dart +++ b/examples/api/lib/material/radio/radio.1.dart @@ -64,9 +64,9 @@ class _RadioExampleState extends State { value: RadioType.backgroundColor, backgroundColor: WidgetStateColor.resolveWith((Set states) { if (states.contains(WidgetState.selected)) { - return Colors.greenAccent.withOpacity(0.5); + return Colors.greenAccent.withValues(alpha: 0.5); } else { - return Colors.grey.shade300.withOpacity(0.3); + return Colors.grey.shade300.withValues(alpha: 0.3); } }), ), diff --git a/examples/api/test/material/radio/radio.1_test.dart b/examples/api/test/material/radio/radio.1_test.dart index 71eb52b44be..3589040c756 100644 --- a/examples/api/test/material/radio/radio.1_test.dart +++ b/examples/api/test/material/radio/radio.1_test.dart @@ -30,11 +30,11 @@ void main() { ); expect( radioBackgroundColor.backgroundColor!.resolve(const {WidgetState.selected}), - Colors.greenAccent.withOpacity(0.5), + Colors.greenAccent.withValues(alpha: 0.5), ); expect( radioBackgroundColor.backgroundColor!.resolve(const {}), - Colors.grey.shade300.withOpacity(0.3), + Colors.grey.shade300.withValues(alpha: 0.3), ); final Radio radioSide = tester.widget>(