Since updating to Flutter 3.7 i am not able to select cerain items in my CupertienoPicker
.
To reproduce this issue run the following code in Windows Desktop:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _index = 0;
List<String> team = <String>["Olaf","Victor","Rita"] ;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: CupertinoPicker(
itemExtent: 50,
onSelectedItemChanged: (selectedIndex) {
_index = selectedIndex;
},
children: List.generate(team.length, (index) {
return Text(team[index]);
}),
),
),
);
}
}
An issue has already filed in github.