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:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user