颤振:无边界半径时可忽略

时间:2019-08-26 15:32:56

标签: android-studio flutter

因此,我正在使用Flutter创建一个Dismissible,而我的Container的孩子的边框半径是40.0,当我长按(“平键”动画)时,拖动时它显示为圆形,但是并非如此,就像您在下面的图像中看到的那样。

这可能吗?

Container(
        margin: const EdgeInsets.only(bottom: 0.0, top: 15.0, right: 10.0, left: 10.0),
        child: FlatButton(
          //color: Colors.grey.withOpacity(0.1),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(40.0),
          ),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Stack(
                children: <Widget>[
                  CircleAvatar(
                    child: ClipOval(
                      child: (document['photoUrl'] != null)
                          ? CachedNetworkImage(
                              placeholder: (context, url) => Icon(
                                Icons.face,
                                size: 60.0,
                                color: Colors.white,
                              ),
                              imageUrl: document['photoUrl'],
                              width: 60.0,
                              height: 60.0,
                              fit: BoxFit.cover,
                              fadeInDuration: Duration(milliseconds: 100),
                            )
                          : Image.asset(
                              "assets/images/placeholder_small_avatar.jpg",
                              fit: BoxFit.cover,
                              width: MediaQuery.of(context).size.width,
                              height: MediaQuery.of(context).size.height,
                            ),
                    ),
                    radius: 30.0,
                    backgroundColor: Colors.grey[400],
                  ),
                ],
              ),
              Expanded(
                child: Container(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Container(
                        child: Row(
                          crossAxisAlignment: CrossAxisAlignment.start,
                          mainAxisSize: MainAxisSize.min,
                          children: <Widget>[
                            Text(
                              '${document['nickname']}',
                              style: TextStyle(
                                color: Colors.black87,
                                fontWeight: FontWeight.bold,
                                fontSize: 16.0,
                              ),
                            ),
                          ],
                        ),
                        alignment: Alignment.centerLeft,
                        margin: const EdgeInsets.only(left: 5.0, bottom: 5.0),
                      ),
                      Container(
                        child: MessageTile(ctx: context, peerId: document['userId'], id: id),
                        margin: const EdgeInsets.only(left: 5.0, bottom: 5.0),
                      )
                    ],
                  ),
                  margin: const EdgeInsets.only(
                    left: 10.0,
                  ),
                ),
              ),
            ],
          ),
          onPressed: () {
            //bla bla
          },
          padding: const EdgeInsets.fromLTRB(8.0, 7.0, 8.0, 7.0),
        ),
      ),

Issue with dismissible

0 个答案:

没有答案