Enable physical model shadows (with animation) and change elevation to a double (#9756)

Fixes https://github.com/flutter/flutter/issues/9342
This commit is contained in:
Jason Simmons
2017-05-03 12:11:01 -07:00
committed by GitHub
parent 2051669ac7
commit b586a97ad2
27 changed files with 192 additions and 192 deletions

View File

@@ -116,7 +116,7 @@ class _CalculatorState extends State<Calculator> {
return new Scaffold(
appBar: new AppBar(
backgroundColor: Theme.of(context).canvasColor,
elevation: 0
elevation: 0.0
),
body: new Column(
crossAxisAlignment: CrossAxisAlignment.stretch,

View File

@@ -127,7 +127,7 @@ class ColorsDemo extends StatelessWidget {
length: allPalettes.length,
child: new Scaffold(
appBar: new AppBar(
elevation: 0,
elevation: 0.0,
title: const Text('Colors'),
bottom: new TabBar(
isScrollable: true,

View File

@@ -162,7 +162,7 @@ class _Heading extends StatelessWidget {
height: (screenSize.height - kToolbarHeight) * 1.35,
child: new Material(
type: MaterialType.card,
elevation: 0,
elevation: 0.0,
child: new Padding(
padding: const EdgeInsets.only(left: 16.0, top: 18.0, right: 16.0, bottom: 24.0),
child: new CustomMultiChildLayout(
@@ -302,7 +302,7 @@ class _OrderPageState extends State<OrderPage> {
.where((Product product) => product != widget.order.product)
.map((Product product) {
return new Card(
elevation: 1,
elevation: 1.0,
child: new Image.asset(
product.imageAsset,
fit: BoxFit.contain,

View File

@@ -39,10 +39,10 @@ class ShrinePage extends StatefulWidget {
/// Defines the Scaffold, AppBar, etc that the demo pages have in common.
class ShrinePageState extends State<ShrinePage> {
int _appBarElevation = 0;
double _appBarElevation = 0.0;
bool _handleScrollNotification(ScrollNotification notification) {
final int elevation = notification.metrics.extentBefore <= 0.0 ? 0 : 1;
final double elevation = notification.metrics.extentBefore <= 0.0 ? 0.0 : 1.0;
if (elevation != _appBarElevation) {
setState(() {
_appBarElevation = elevation;

View File

@@ -193,7 +193,7 @@ class StockHomeState extends State<StockHome> {
Widget buildAppBar() {
return new AppBar(
elevation: 0,
elevation: 0.0,
title: new Text(StockStrings.of(context).title()),
actions: <Widget>[
new IconButton(