In Flutter v3.27, .withOpacity(0.3) has been replaced with .withValues(alpha: 0.3).
v3.27
.withOpacity(0.3)
.withValues(alpha: 0.3)
Before
Colors.red.withOpacity(0.3)
After
Colors.red.withValues(alpha: 0.3)
For more details, you can check the Flutter migration guide: Migration Guide