- Notifications
You must be signed in to change notification settings - Fork30k
Open
Description
Steps to reproduce
Run the provided code in dartpad below in the web build, and you'll see an inexplicable line along the bottom of the image.
Seems to be a regression of:#44304 (comment)
Expected results
The gradient should fill 300px
Actual results
The gradient fills 299px
Code sample
Code sample
import'package:flutter/material.dart';voidmain() {runApp(constMyApp());}classMyAppextendsStatelessWidget {constMyApp({super.key});@overrideWidgetbuild(BuildContext context) {returnMaterialApp( title:'Flutter Stack Layers', theme:ThemeData( primarySwatch:Colors.blue, visualDensity:VisualDensity.adaptivePlatformDensity, ), home:constMyHomePage(), debugShowCheckedModeBanner:false,// Optional: Hide the debug banner ); }}classMyHomePageextendsStatelessWidget {constMyHomePage({super.key});@overrideWidgetbuild(BuildContext context) {returnScaffold( appBar:AppBar(title:constText('600x600 Stack with 3 Layers')), body:Center( child:SizedBox( width:600, height:600, child:Stack( children:<Widget>[Container(color:Colors.black),Align( alignment:Alignment.topCenter, child:Container( width:600, height:299, child:Image.network('https://picsum.photos/600/300?random=1', fit:BoxFit.cover, ), ), ),Align( alignment:Alignment.topCenter, child:Container( width:600, height:300, decoration:constBoxDecoration( gradient:LinearGradient( begin:Alignment.bottomCenter, end:Alignment.topCenter, colors: [Colors.black,Colors.transparent], ), ), ), ), ], ), ), ), ); }}
Screenshots or Video
Metadata
Metadata
Assignees
Labels
No labels
