diff --git a/dev/benchmarks/complex_layout/pubspec.yaml b/dev/benchmarks/complex_layout/pubspec.yaml index e8d954f1fa..f53c06fef8 100644 --- a/dev/benchmarks/complex_layout/pubspec.yaml +++ b/dev/benchmarks/complex_layout/pubspec.yaml @@ -6,7 +6,9 @@ dependencies: path: ../../../packages/flutter flutter_driver: path: ../../../packages/flutter_driver - flutter_gallery_assets: '0.0.20' + # Also update dev/manual_tests/pubspec.yaml + # and examples/flutter_gallery/pubspec.yaml + flutter_gallery_assets: '0.0.21' dev_dependencies: flutter_test: diff --git a/dev/manual_tests/pubspec.yaml b/dev/manual_tests/pubspec.yaml index 4da64c177e..010e1135b6 100644 --- a/dev/manual_tests/pubspec.yaml +++ b/dev/manual_tests/pubspec.yaml @@ -4,7 +4,9 @@ dependencies: path: ../../packages/flutter flutter_sprites: path: ../../packages/flutter_sprites - flutter_gallery_assets: '0.0.20' + # Also update dev/manual_tests/pubspec.yaml + # and dev/benchmarks/complex_layout/pubspec.yaml + flutter_gallery_assets: '0.0.21' dev_dependencies: test: any # flutter_test provides the version constraints diff --git a/examples/flutter_gallery/flutter.yaml b/examples/flutter_gallery/flutter.yaml index 1792024197..dd9054770e 100644 --- a/examples/flutter_gallery/flutter.yaml +++ b/examples/flutter_gallery/flutter.yaml @@ -35,8 +35,6 @@ assets: - packages/flutter_gallery_assets/ali_connors.png - packages/flutter_gallery_assets/kangaroo_valley_safari.png - packages/flutter_gallery_assets/top_10_australian_beaches.png - - packages/flutter_gallery_assets/grain.png - - packages/flutter_gallery_assets/fancylines.png - packages/flutter_gallery_assets/landscape_0.jpg - packages/flutter_gallery_assets/landscape_1.jpg - packages/flutter_gallery_assets/landscape_2.jpg diff --git a/examples/flutter_gallery/lib/demo/pesto_demo.dart b/examples/flutter_gallery/lib/demo/pesto_demo.dart index 7cee0b9fdf..aedbe54d31 100644 --- a/examples/flutter_gallery/lib/demo/pesto_demo.dart +++ b/examples/flutter_gallery/lib/demo/pesto_demo.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:math'; + import 'package:flutter/material.dart'; const String _kUserName = 'Jonathan'; @@ -13,6 +15,7 @@ final Map _kLogoImages = { 70.0: 'packages/flutter_gallery_assets/pesto/logo_medium.png', 170.0: 'packages/flutter_gallery_assets/pesto/logo_big.png', }; + final ThemeData _kTheme = new ThemeData( brightness: Brightness.light, primarySwatch: Colors.teal, @@ -108,12 +111,18 @@ class _PestoDemoState extends State { double bestHeight = _kLogoImages.keys.lastWhere( (double height) => appBarHeight >= height ); + // Extra padding. Calculated to give about 16px on the bottom for the + // `small` logo at its native size, and 30px for the `medium`. + double extraPadding = min(0.19 * appBarHeight + 5.4, 40.0); return new Padding( - padding: new EdgeInsets.only(top: statusBarHeight), + padding: new EdgeInsets.only( + top: statusBarHeight + 0.5 * extraPadding, + bottom: extraPadding + ), child: new Center( child: new AssetImage( name: _kLogoImages[bestHeight], - fit: ImageFit.none + fit: ImageFit.scaleDown ) ) ); diff --git a/examples/flutter_gallery/pubspec.yaml b/examples/flutter_gallery/pubspec.yaml index 69be1770f6..1a874a2caf 100644 --- a/examples/flutter_gallery/pubspec.yaml +++ b/examples/flutter_gallery/pubspec.yaml @@ -8,7 +8,9 @@ dependencies: path: ../../packages/flutter flutter_markdown: path: ../../packages/flutter_markdown - flutter_gallery_assets: '0.0.20' + # Also update dev/benchmarks/complex_layout/pubspec.yaml + # and examples/flutter_gallery/pubspec.yaml + flutter_gallery_assets: '0.0.21' dev_dependencies: test: any # flutter_test provides the version constraints