You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scrolling list changes lead to graphical glitches #159
This demo should sort a scrollable list of green bubbles by brightness when you press the sort button. But there are some graphical glitches, try scrolling around and sorting a few times.
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/widgets.dart';
class Circle extends Component {
Circle(this.color);
final Color color;
Widget build() {
return new Container(
decoration: new BoxDecoration(
shape: Shape.circle,
backgroundColor: color
)
);
}
}
List<Color> colors = [
const Color(0x0F00FF00),
const Color(0xCF00FF00),
const Color(0x1F00FF00),
const Color(0xBF00FF00),
const Color(0xAF00FF00),
const Color(0x9F00FF00),
const Color(0x3F00FF00),
const Color(0x8F00FF00),
const Color(0x4F00FF00),
const Color(0x7F00FF00),
const Color(0x5F00FF00),
const Color(0x6F00FF00)
];
class ScrollingApp extends App {
bool shouldSort = false;
Widget build() {
List<Color> sortedColors = new List<Color>.from(colors);
if (shouldSort) {
sortedColors.sort((a, b) => a.alpha.compareTo(b.alpha));
}
List<Widget> circles = [];
for(Color color in sortedColors) {
circles.add(new Circle(color));
}
for(int i = 0; i < colors.length; i++)
return new Column([
new Container(
height: 300.0,
child: new ScrollableViewport(
// key: new GlobalKey(),
child: new Grid(
circles,
maxChildExtent: 150.0
)
)
),
new Flexible(
child: new Center(
child: new RaisedButton(
child: new Text("Toggle sorting"),
onPressed: () => setState(() => shouldSort = !shouldSort)
)
)
)
]);
}
}
void main() {
runApp(new ScrollingApp());
}
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
FlutterIssues commentedon Nov 9, 2015
Thursday Sep 10, 2015 at 23:04 GMT
FlutterIssues commentedon Nov 9, 2015
Thursday Sep 10, 2015 at 23:04 GMT
cc @abarth @Hixie
FlutterIssues commentedon Nov 9, 2015
Tuesday Sep 15, 2015 at 05:22 GMT
cc @chinmaygarde for a first look
sethladd commentedon Aug 25, 2016
I have a feeling this is out of date. :) Should we close?
Hixie commentedon Aug 25, 2016
We should test it :-)
sethladd commentedon Aug 25, 2016
We should test a lot of stuff :)
Going to close, but feel free to open a new issue specific to testing.
Update Android NDK to r17b (flutter#159)
github-actions commentedon Aug 17, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.