CopyPastor

Detecting plagiarism made easy.

Score: 0.8015843033790588; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2020-06-08
by Peter Haddad

Original Post

Original - Posted on 2019-10-03
by Sanjayrajsinh



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Try the following:
``` StreamBuilder<QuerySnapshot>( stream: query.snapshots(), builder: (context,snapshot){
if (!snapshot.hasData){ return Text("Loading"); } else if(snapshot.hasData){ return ListView.builder(
itemCount: snapshot.data.documents.length, itemBuilder: (context, index){ String itemTitle = snapshot.data.documents[index]['itemTitle'];
return CardItem(itemTitle:itemTitle,);
}); } return CircularProgressIndicator(); }, ); ```
You want to wrap your card in Column because inner Column take full height
Column(children: <Widget>[ Card( margin: const EdgeInsets.all(10.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AspectRatio( aspectRatio: 18.0 / 13.0, child: Image.network( "https://i.stack.imgur.com/mDkkT.png", fit: BoxFit.fill, ), ), Padding( padding: EdgeInsets.fromLTRB(16.0, 12.0, 16.0, 8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Demo", textAlign: TextAlign.center, ), ], ), ), ], ), ) ])

        
Present in both answers; Present only in the new answer; Present only in the old answer;