-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Description
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
ScrollController c;
return Transform(
transform: Matrix4.identity()
..setEntry(3, 2, 0.001)
..rotateX(0.01 * 10), // <-- this causes the ListView to disappear
child: Scaffold(
body: Center(
child: Container(
width: 200,
child: ListView.builder(
controller: c = ScrollController()..addListener(() {
print(c.offset);
}),
itemBuilder: (BuildContext context, int index) {
return Container(
height: 100.0,
color: index % 2 == 0 ? Colors.blue : Colors.red,
child: Text('Tile $index'),
);
},
),
),
),
),
);
}
}If the line with the comment that does the rotation is removed everything shows up as expected. The scroll view itself is still "there", if you scroll the area where it is supposed to be the new scroll position gets printed to the console.
Metadata
Metadata
Assignees
Labels
No labels