0

我已经创建了小部件并使用 Gridview.count 在列中调用了参数,但我想将相同的参数推送到另一个屏幕。请问我该怎么做?谢谢

child: new Column(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: <Widget>[
              GridView.count(
                crossAxisCount: 2,
                primary: false,
                crossAxisSpacing: 10.0,
                childAspectRatio: 0.75,
                mainAxisSpacing: 10.0,
                shrinkWrap: true,
                children: <Widget>[
                  Hero(
                    tag: 'f2',
                    child: flashCard('images/flashSales/f2.jpg', 'Iphone 8, 126gb ram','Ghs 2,150', 'Newsite, Takoradi', '8 Available', true),
                  ),

                ],
              ),
            ]),
      )
    ]));

}

  Widget flashCard(String pixPath, String heading, String price,
  String location, String available, bool inStock) {
return Container(
  width: 170.0,
  child: new Card(
    elevation: 2.0,
    child: Wrap(
      children: <Widget>[
        Container(
          height: 140.0,
            decoration: BoxDecoration(
                image: DecorationImage(
                    image: AssetImage(pixPath),
                  fit: BoxFit.cover,),

            ),
        ), 
4

0 回答 0