Flutter Network Image does not fit in Circular Avatar

后端 未结 23 1224
走了就别回头了
走了就别回头了 2020-12-29 02:06

I am trying to retrieve bunch of images from an api. I want the images to be displayed in Circular form so I am using CircleAvatar Widget, but I keep getting im

23条回答
  •  无人及你
    2020-12-29 02:28

    Column(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    children: [
                      GestureDetector(
                        onTap: () {
                          Navigator.push(
                            context,
                            MaterialPageRoute(builder: (context) => MyApp7()),
                          );
                        },
                        child: CircleAvatar(
                          radius: 50,
                          // backgroundColor: Colors.amber,
                          child: CircleAvatar(
                              backgroundColor: Colors.grey[50],
                              radius: 50,
                              // child: Image.asset("assets/images/nophotoMale.png")
                              backgroundImage:
                                  AssetImage("assets/images/nophotoMale.png")),
                        ),
                      ),
                    ],
                  ),
    

提交回复
热议问题