相关疑难解决方法(0)

Flutter:Inkwell不适用于Card

我正在尝试在卡片小部件上实现包装并对其进行包装,但是它根本不起作用。我将Tap保留为null,因为此类使用3个参数,稍后将其填充以生成多个卡。我看不到发生了什么,这阻止了InkWell的起伏,因此我们将不胜感激。

class FeedBackCardsImage extends StatelessWidget {
  final String imagePath;
  final String cardTitle;
  final String cardTag;

  FeedBackCardsImage({
    this.imagePath,
    this.cardTitle,
    this.cardTag,
  });

  @override
  Widget build(BuildContext context) {

      return InkWell(
          child: new Container(
            child: new Card(
              child: new Padding(
                padding: new EdgeInsets.all(15.0),
                child: new Column(
                  children: <Widget>[
                    new SizedBox(
                      height: 184.0,
                      child: new Stack(
                        children: <Widget>[
                          new Positioned.fill(
                            child: new Image.asset(
                              imagePath,
                              //package: destination.assetPackage,
                              fit: BoxFit.contain,
                            ),
                          ),
                        ],
                      ),
                    ),
                    new Padding(
                      padding: new EdgeInsets.all(
                        7.0,
                      ),
                      child: new Text(
                        cardTitle,
                        style: …
Run Code Online (Sandbox Code Playgroud)

flutter

11
推荐指数
5
解决办法
3313
查看次数

标签 统计

flutter ×1