[英]How to remove elevation shadow from one side without removing elevation itself in flutter from Card or Material widget?
如何刪除 Card 或 Material 小部件內的頂部高程陰影。
我將 Material 小部件用於容器並給出了高程值。 它從四面八方反射到我的容器。 但我只想要左側、底部和右側的高度陰影。 我怎樣才能得到它或去除頂側立面陰影。 來自 Material 或 Card Widget 的示例會很有用。
Material( elevation: 3, child: Container( height: 100, width: 300, ), )
為此,您只需要通過增加offset屬性的y 軸來降低shadow ,就像這樣:
offset
shadow
Container( height: 100.0, width: 300.0, decoration: BoxDecoration( borderRadius: BorderRadius.circular(20.0), color: Colors.white, boxShadow: [ BoxShadow( spreadRadius: 2, blurRadius: 3, offset: Offset(0, 6), color: Colors.black38 ) ] ), ),
這是輸出:
[英]Card elevation shadow in Flutter
[英]Flutter- Card elevation without shadow
[英]Transparent card but with shadow effect from elevation
[英]Flutter:How to remove elevation from ExpansionPanelList?
[英]Give Flutter Card an elevation only from the Top
[英]How to remove the elevation (shadow) in a SearchDelegate?
[英]How to remove elevation in Flutter GridView?
[英]How to Calculate elevation from gps altitude in flutter
[英]Animate the elevation of flutter widget
[英]Elevation not working on flutter material
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.