L'argument de type "Image" ne peut pas être attribuée au paramètre " type de ImageProvider<Object>"

0

La question

j'ai été essayer le contenant, j'ai mis image.net le travail des enfants c'est du travail mais j'ai besoin d'une bordure personnalisée de l'image de ce qui devrait je l'ai corrigé.

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

La meilleure réponse

2

Changer l'image décoration :

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

Code complet :

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

pouvez-vous veuillez cocher la réponse correcte? et aussi upvote pour que les autres puissent en faire usage.
Alan Bosco

Assurez-vous bro, je dois attendre environ 10 min pour la marque.
imdsk

Dans d'autres langues

Cette page est dans d'autres langues

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