以编程方式触发扑动IconButton波纹动画?

时间:2019-05-21 20:24:41

标签: flutter

有没有办法以编程方式触发IconButton波纹动画?以下是一些代码:

@override
  Widget build(BuildContext context) {
    return Material(
        child: Container(
            margin: EdgeInsets.only(top: 12, left: 18, right: 18),
            padding: EdgeInsets.only(top: 8, bottom: 8),
            decoration: BoxDecoration(
              color: _bgColor,
              border: new Border.all(color: _bgColor),
              borderRadius: BorderRadius.all(Radius.circular(
                      10.0) //                 <--- border radius here
                  ),
            ),
            child: Row(children: [
              IconButton(
                padding: EdgeInsets.only(right: 16),
                icon: Icon(Icons.play_arrow, color: Colors.white, size: 48),
                tooltip: 'Start ${issue.issueName}',
                onPressed: () {},
              ),
              Expanded(
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Container(
                      padding: const EdgeInsets.only(bottom: 8),
                      child: Text(
                        issue.title,
                        style: TextStyle(
                          color: Colors.white,
                          fontWeight: FontWeight.bold,
                        ),
                        softWrap: true,
                      ),
                    ),
                    Text(
                      issue.issueName,
                      style: TextStyle(
                        color: Colors.white,
                      ),
                    ),
                  ],
                ),
              ),
            ])));
  }

0 个答案:

没有答案