How to Show an Local image till the NetworkImage() Loads Up in flutter?

前端 未结 9 1025
忘掉有多难
忘掉有多难 2021-02-13 03:15
            new CircleAvatar(
                              backgroundColor: Colors.black87,
                              backgroundImage: new NetworkImage(url),
               


        
9条回答
  •  忘掉有多难
    2021-02-13 03:32

    You can Use FadeInImage.

    Use a placeholder from asset

    FadeInImage.assetNetwork(
                                  placeholder: "assets/images/image1.png",
                                  image:"URL"
                                    ),
    

    Use a placeholder from memory

    FadeInImage.memoryNetwork(
                                          placeholder: localImageBytes,
                                          image:"URL"
                                        ),
    

提交回复
热议问题