我创建了两个 'raised buttons' 但只显示了一个。这里有什么问题?
I have created two 'raised buttons' but only one is showing. What is the problem here?
我在应用程序中总共制作了 14 个屏幕,您可以在下面提供的 link 代码中看到。我创建了两个凸起的按钮,一个名为 'Wonders of world' 的按钮在按下时会将其带到第二个屏幕,另一个名为 'wonders of India' 的按钮会将其带到第十一个屏幕。不幸的是,世界上第一个按钮奇迹是不可见的。为什么不显示?
This is the image on running the app, you can see only one raised button visible.
只需将您的两个按钮都包裹在行中即可
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RaisedButton(
child: Text("Wonders of World"),
onPressed: (){
Navigator.push(context, MaterialPageRoute(builder: (context) => SplashUI()));
},
color: Colors.red,
textColor: Colors.yellow,
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
splashColor: Colors.grey,
),
RaisedButton(
child: Text("Wonders of India"),
onPressed: (){
Navigator.push(context, MaterialPageRoute(builder: (context) => EleventhScreen()));
},
color: Colors.red,
textColor: Colors.yellow,
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
splashColor: Colors.grey,
)
],
),
我在应用程序中总共制作了 14 个屏幕,您可以在下面提供的 link 代码中看到。我创建了两个凸起的按钮,一个名为 'Wonders of world' 的按钮在按下时会将其带到第二个屏幕,另一个名为 'wonders of India' 的按钮会将其带到第十一个屏幕。不幸的是,世界上第一个按钮奇迹是不可见的。为什么不显示? This is the image on running the app, you can see only one raised button visible.
只需将您的两个按钮都包裹在行中即可
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RaisedButton(
child: Text("Wonders of World"),
onPressed: (){
Navigator.push(context, MaterialPageRoute(builder: (context) => SplashUI()));
},
color: Colors.red,
textColor: Colors.yellow,
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
splashColor: Colors.grey,
),
RaisedButton(
child: Text("Wonders of India"),
onPressed: (){
Navigator.push(context, MaterialPageRoute(builder: (context) => EleventhScreen()));
},
color: Colors.red,
textColor: Colors.yellow,
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
splashColor: Colors.grey,
)
],
),