hello I've been trying return an empty listtitle using Firebase values the code worked fine before but when i try to add a container with border for my listitle the border still remain on screen I'm now to flutter and this my first time using if statement how do i make the border stops appearing enter image description here
Container(
child: ListView.builder(
shrinkWrap: true,
itemCount: 1,
itemBuilder: (context, index) {
if (widget.info.data() != null) {
return Container(
height: 200,
width: 200,
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
children: [
Container(
width: 200,
height: 150,
child: Padding(
padding: EdgeInsets.all(8.0),
child: ListTile(
title: Text(widget.info.data()['test']),
subtitle:
Text(widget.info.data()['test1']),
key: Key("${6}"),
onTap: () {
Clipboard.setData(new ClipboardData(
text: widget.info.data()['test']));
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text('text copied')));
}),
),
),
Container(
width: 150,
height: 150,
child: Padding(
padding: EdgeInsets.all(8.0),
child: Card(
color: Colors.white,
shape: RoundedRectangleBorder(
side: BorderSide(
color: Colors.black, width: 3),
borderRadius: BorderRadius.circular(10),
),
child: ListTile(
title:
Text(widget.info.data()['test3']),
key: Key("${7}"),
subtitle:
Text(widget.info.data()['test4']),
onTap: () {
Clipboard.setData(new ClipboardData(
text:
widget.info.data()['test3']));
Scaffold.of(context).showSnackBar(
SnackBar(
content:
Text('text copied')));
}),
),
),
),
]),
);
} else {
return Container();
}
}),
),
Aucun commentaire:
Enregistrer un commentaire