-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当子组件是 StatefulWidget时 滑动时 第一张会自动弹回来 #12
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
麻烦看下 这个问题 在线等 挺急的。。。 |
哈哈,我看看 |
用 DartPad 弄不出来呢...等我回去用我自己的电脑看看吧 (>人<;) |
好的 谢谢 |
这个问题解决了吗? |
List cards = List.generate(
colors.length,
(int index) {
return TestPage(colors[index]);
},
);
class TestPage extends StatefulWidget {
Color color;
@OverRide
TestPageState createState() => new TestPageState(color);
TestPage(this.color);
}
class TestPageState extends State {
Color color;
TestPageState(this.color);
@OverRide
Widget build(BuildContext context) {
return Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: color,
),
);
}
}
The text was updated successfully, but these errors were encountered: