Reputation: 300
I have a setup where I have used columns, containers and expanded widgets. There's a line between two containers. I am not sure why and which widget is generating that line. I tried providing decoration for container with 0 border to see if there was default border definition but that wasn't the case.
class GalleryImage extends StatelessWidget {
final String tag;
final ImageProvider image;
GalleryImage(this.tag, this.image);
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
Container(
padding: EdgeInsets.all(0.0),
child: Column(
children: <Widget>[
Container(
decoration: BoxDecoration(
border: Border.all(color:Colors.white, width:0.0, style:BorderStyle.none),
color: Colors.white,
),
child: Hero(
tag: tag,
child: Image(
image: image,
),
),
),
Container(
decoration: BoxDecoration(
border: Border.all(color:Colors.white, width:0.0, style:BorderStyle.none),
color: Colors.white,
),
width: double.infinity,
padding: EdgeInsets.fromLTRB(10.0, 15.0, 15.0, 15.0),
child:Text(
"Beautiful Nepal",
style: Theme.of(context).textTheme.headline,
),
),
Expanded(
child: Container(
color: Colors.white,
padding: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 0.0),
child:Text(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla malesuada varius viverra. Proin malesuada id nisl a ultricies.",
style: Theme.of(context).textTheme.body1,
),
)
),
],
)
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0.0,
),
),
],
);
}
}
Upvotes: 1
Views: 958
Reputation: 54377
style: Theme.of(context).textTheme.headline
to
style: Theme.of(context).textTheme.title
or something like
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 40.0, fontFamily: 'Open Sans',)
Upvotes: 0
Reputation: 4849
I haven't used an image but a yellow container to test your code.
I don't have a separator, here is how it looks:
What I would recommend is to try and use the Flutter inspector and Select widget mode:
And then try to tap on that widget:
It should be able to highlight the widget that is causing this behaviour and help you to further investigate.
Upvotes: 1