飘动的gridview小部件
因此,我想将我的 gridview.count
窗口小部件放在我的应用程序的底部中心中。 如您所见,我的 text
窗口小部件很好地安排了。我不明白这两个区别的差异。
我应该读什么或我在做什么错误?
这就是外观:
body: Stack(
children: <Widget>[
Align(
alignment: Alignment.bottomCenter,
child: GridView.count(
crossAxisCount: 4,
children: const [
MyButton(myIcon: Icon(Icons.add), myColor: Colors.red),
MyButton(myIcon: Icon(Icons.remove), myColor: Colors.green),
MyButton(myIcon: Icon(Icons.adb), myColor: Colors.blue),
MyButton(myIcon: Icon(Icons.air), myColor: Colors.red),
],
),
),
Align(
alignment: Alignment.centerLeft,
child: Text(_wynik.toString(),
style: GoogleFonts.overpass(
fontSize: 50,
backgroundColor: Colors.amber,
color: Colors.white))),
],
)
so i want to put my Gridview.count
widget in bottomCenter of my app.
As you can see, my Text
widget arranges fine.I dont understand the difference beetwen those two.
What should i read or what mistake am i doing?
That's how it looks :
body: Stack(
children: <Widget>[
Align(
alignment: Alignment.bottomCenter,
child: GridView.count(
crossAxisCount: 4,
children: const [
MyButton(myIcon: Icon(Icons.add), myColor: Colors.red),
MyButton(myIcon: Icon(Icons.remove), myColor: Colors.green),
MyButton(myIcon: Icon(Icons.adb), myColor: Colors.blue),
MyButton(myIcon: Icon(Icons.air), myColor: Colors.red),
],
),
),
Align(
alignment: Alignment.centerLeft,
child: Text(_wynik.toString(),
style: GoogleFonts.overpass(
fontSize: 50,
backgroundColor: Colors.amber,
color: Colors.white))),
],
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加
缩水:true
到GridViewadd
shrinkWrap: true
to GridView