The argument type 'Image' can't be assigned to the parameter type 'ImageProvider<Object>'

0

i was try the container the i put image.net work in child it's work but i need to custom border of image what should i fixed it.

Expanded(
                                            child: Align(
                                              alignment: Alignment.center,
                                              child: Container(
                                                height: 45, //height, //155,
                                                width: 45, //width, //155,
                                                decoration: BoxDecoration(
                                                  color:
                                                      const Color(0xff7c94b6),
                                                  image: DecorationImage(
                                                    image: Image.network(state
                                                        .offerConfirm
                                                        .ownImage[index]),
                                                    fit: BoxFit.cover,
                                                  ),
                                                  borderRadius:
                                                      BorderRadius.circular(12),
                                                ),
                                              ),
                                            ),
                                            flex: 3,
                                          ),

enter image description here

dart flutter
2021-11-24 04:22:43
1

2

Change image decoration to :

decoration: BoxDecoration(
      image: DecorationImage(image: NetworkImage("urlImage"),
      fit: BoxFit.cover)
    ),

Full code :

Expanded(
                                            child: Align(
                                              alignment: Alignment.center,
                                              child: Container(
                                                height: 45, //height, //155,
                                                width: 45, //width, //155,
                                                decoration: BoxDecoration(
                                                  color:
                                                      const Color(0xff7c94b6),
                                                  image: DecorationImage(
                                                    image: NetworkImage(state
                                                        .offerConfirm
                                                        .ownImage[index])
                                                    fit: BoxFit.cover,
                                                  ),
                                                  borderRadius:
                                                      BorderRadius.circular(12),
                                                ),
                                              ),
                                            ),
                                            flex: 3,
                                          ),
2021-11-24 04:28:55

can you please mark the answer correct? and also upvote so that other people can make use of it.
Alan Bosco

Sure bro, i have to wait around 10 min for mark.
imdsk

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................