你好,我想在同一行上有两个手势检测,问题是,当我运行应用程序时,两个手势检测不在同一行,而是在不同的行中,这使得它看起来很奇怪的用户。如何让它们在同一行一个在左边另一个在右边但是同一行
loginFields1() =>
Container(
child: Form(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
GestureDetector(
onTap: () {
//Navigate to Forgot Password Screen...
Navigator.push(context, MaterialPageRoute(builder: (context) => LoginPage2()));
},
child: Padding(
padding: EdgeInsets.only(right: size.getWidthPx(180)),
child: Align(
alignment: Alignment.centerRight,
child: Text("Validate Certificate",
style: TextStyle(fontFamily: 'Exo2',fontSize: 14.0, fontWeight: FontWeight.bold, color: colorCurve2))),
)),
GestureDetector(
onTap: () {
//Navigate to Forgot Password Screen...
Navigator.push(context, MaterialPageRoute(builder: (context) => LoginPage3()));
},
child: Padding(
padding: EdgeInsets.only(bottom: size.getWidthPx(0)),
child: Align(
alignment: Alignment.centerRight,
child: Text("Reset Password",
style: TextStyle(fontFamily: 'Exo2',fontSize: 14.0, fontWeight: FontWeight.bold, color: colorCurve2))),
)),
],
)),
);
所以问题是您正在使用列而不是行。只需删除列并将其更改为行。这是我如何使用两个手势检测器。
希望有帮助:D