我一直试图在容器顶部的堆栈中设置一个墨水池,但是,墨水瓶按钮对父容器边界线以下的另一半不响应。的代码是:
new Stack(
alignment: AlignmentDirectional.bottomCenter,
children: <Widget>[
new Container(
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: new BorderRadius.circular(50.0),
border: new Border.all(
width: 6.0,
color: Colors.amber,
),
),
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
new Padding(
padding: size.height > size.width ? new EdgeInsets.all(10.0) : new EdgeInsets.all(5.0),),
imagePathStore == null ? Center(
child: Container(
height: size.height > size.width ? size.height * 0.2 : size.height * 0.1,
width: size.height > size.width ? size.width * 0.2 : size.width * 0.1,
child: RaisedButton(
splashColor: Colors.amber,
color: Colors.white,
shape: CircleBorder(
side: BorderSide(
width: 3.0,
color: Colors.amber)),
onPressed: () => getImage(context),
child: new IconTheme(
data: IconThemeData(
size: size.height * 0.05,
color: Colors.amber),
child: Icon(Icons.add),
),
),
),
)
: InkWell(
onTap: () => getImage(context),
child: new Container(
width: 130.0,
height: 130.0,
decoration: new BoxDecoration(
shape: BoxShape.circle,
image: new DecorationImage(
image: FileImage(File(imagePathStore)),
fit: BoxFit.fill,
))),
),
new Padding(
padding: size.height > size.width ? new EdgeInsets.all(size.height * 0.1) : new EdgeInsets.all(size.height * 0.08),
child: new TextField(
focusNode: _focusName,
autocorrect: false,
onSubmitted: _submit(userName),
onChanged: _onTyping,
controller: TextEditingController(text: userName),
decoration: new InputDecoration(
labelStyle: TextStyle(color: Colors.red),
isDense: true,
border: const OutlineInputBorder(
borderRadius: const BorderRadius.all(const Radius.circular(10.0)),
borderSide: const BorderSide(
style: BorderStyle.solid,
width: 100.0,
color: Colors.amber)),
hintText: Loca.of(context).writeYourName,
),
),
),
],
),
),
//Here is the button which is having problems
FractionalTranslation(
translation: Offset(0.0, 0.5),
child: new InkWell(
onTap: tabSreen,
splashColor: Colors.green,
child: new Shake(
animation: shakeAnimation,
child: new Container(
// alignment: Alignment(0.0, 0.5),
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(const Radius.circular(16.0)),
color: Colors.deepOrange,
),
height: 125.0,
width: 100.0,
child: new Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
))),
))
],
),
下面的图像代表了我要解决的问题。墨水池位于所需的位置,但是由于分数平移,按钮的下半部分没有响应。我曾尝试使用RaisedButton,FlatButton,Material Button,但仍然存在相同的问题。