Update shadow rendering

Shadows now render as three seprate MaskFilter.blur components per the most recent Material spec.

The shadows Map was replaced by a similar Map called elevationToShadow with entries that match the 10 elevations specifed by http://www.google.com/design/spec/what-is-material/elevation-shadows.html.

The "level" property (many classes) is now called "elevation", to match the Material spec.

BoxShadow now includes a spreadRadius parameter - as in CSS box-shadow. Renamed the BoxShadow blur property to blurRadius to further align BoxShadow with CSS box-shadow.
This commit is contained in:
Hans Muller
2015-11-17 15:50:39 -08:00
parent b20a1f4a15
commit d9153a13c6
19 changed files with 152 additions and 118 deletions

View File

@@ -13,7 +13,7 @@ void main() {
gradient: new RadialGradient(
center: Point.origin, radius: 500.0,
colors: <Color>[Colors.yellow[500], Colors.blue[500]]),
boxShadow: shadows[3])
boxShadow: elevationToShadow[8])
);
var paddedBox = new RenderPadding(
padding: const EdgeDims.all(50.0),

View File

@@ -146,7 +146,7 @@ class StockHomeState extends State<StockHome> {
Widget buildToolBar() {
return new ToolBar(
level: 0,
elevation: 0,
left: new IconButton(
icon: "navigation/menu",
onPressed: _showDrawer

View File

@@ -100,7 +100,7 @@ Widget statusBox(Widget child) {
decoration: const BoxDecoration(
boxShadow: const <BoxShadow>[
const BoxShadow(
color: mediumGray, offset: const Offset(6.0, 6.0), blur: 5.0)
color: mediumGray, offset: const Offset(6.0, 6.0), blurRadius: 5.0)
],
backgroundColor: darkGray
),