🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Ramazan HABER / FLUTTER / Tam kaplayan sığan resimli güzel Card Widget kullanımı image fixed size inside box

1-) FLUTTER - Tam kaplayan sığan resimli güzel Card Widget kullanımı image fixed size inside box

 

 

Container getRestoCardModel() {
  
return Container(
      margin:
EdgeInsets.all(8.0),
      child:
Card(
        shape:
RoundedRectangleBorder(
            borderRadius:
BorderRadius.all(Radius.circular(8.0))),
        child:
InkWell(
          onTap: () => print(
"ciao"),
          child:
Column(
            crossAxisAlignment:
CrossAxisAlignment.stretch, // add this
            
children: <Widget>[
              
ClipRRect(
                borderRadius:
BorderRadius.only(
                  topLeft:
Radius.circular(8.0),
                  topRight:
Radius.circular(8.0),
                ),
                child:
Image.network('https://placeimg.com/640/480/any',
                    
// width: 300,
                    
height: 150,
                    fit:
BoxFit.fill),
              ),
              
ListTile(
                title:
Text('Pub 1'),
                subtitle:
Text('Location 1'),
              ),
            ],
          ),
        ),
      ),);
}

 

 

 

 

 

 

 

kaynak : https://stackoverflow.com/questions/54885879/flutter-how-to-handle-image-with-fixed-size-inside-box

 

 2022 Nisan 01 Cuma
 374