Skip to content

Commit

Permalink
Merge pull request yubo725#11 from bhaltair/bugfix/slider
Browse files Browse the repository at this point in the history
Fix 图片fit 100%
  • Loading branch information
yubo725 authored Aug 5, 2018
2 parents db629f4 + ec49707 commit 2c6a173
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/widgets/SlideView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ class SlideViewState extends State<SlideView> with SingleTickerProviderStateMixi
},
child: new Stack(
children: <Widget>[
new Image.network(imgUrl),
new Container(
width: MediaQuery.of(context).size.width,
child: new FittedBox(
child: new Image.network(imgUrl),
fit: BoxFit.fill,
)
),
new Container(
width: MediaQuery.of(context).size.width,
color: const Color(0x50000000),
Expand Down

0 comments on commit 2c6a173

Please sign in to comment.