-
Notifications
You must be signed in to change notification settings - Fork 30.2k
CupertinoPicker does not respect _kOverAndUnderCenterOpacity #70933
Copy link
Copy link
Closed
flutter/engine
#22674Closed
Copy link
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryfound in release: 1.24Found to occur in 1.24Found to occur in 1.24frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on
Description
Steps to Reproduce
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) => MaterialApp(
title: 'CupertinoPicker Bug',
theme: ThemeData(primarySwatch: Colors.blue),
home: MyHomePage(),
);
}
class MyHomePage extends StatelessWidget {
MyHomePage({Key key}) : super(key: key);
List<String> samples = ["one", "two", "three", "four", "five"];
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(title: Text('CupertinoPicker Bug')),
body: Center(
child: SizedBox(
height: 300.0,
child: CupertinoPicker.builder(
childCount: samples.length,
itemExtent: 26,
itemBuilder: (context, index) => Text(samples[index]),
onSelectedItemChanged: (_) {},
),
),
),
);
}
Expected results:
Not selected items should appear with lower opacity.

Actual results:
Not selected items do not appear at all.
Same behavior on iOS and Android.

Logs
[✓] Flutter (Channel master, 1.24.0-8.0.pre.321, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-DE)
• Flutter version 1.24.0-8.0.pre.321 at /Users/visit/Library/Flutter
• Framework revision 05dadb0120 (9 hours ago), 2020-11-20 07:33:05 +0530
• Engine revision a0da844845
• Dart version 2.12.0 (build 2.12.0-50.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/visit/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Users/visit/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.6953283/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.10.0.rc.1
[✓] Android Studio (version 4.1)
• Android Studio at /Users/visit/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.6953283/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (1 available)
• iPhone 12 (mobile) • 8C0363C4-6EC7-44F4-A44B-61A2F776E4A2 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-2 (simulator)
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryfound in release: 1.24Found to occur in 1.24Found to occur in 1.24frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work on