From 8af91f0401924cfbbb848e883912c83d50f0cbb1 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 28 Mar 2017 17:16:27 -0700 Subject: [PATCH] Some more ImageFit -> BoxFit updates (#8927) --- packages/flutter/lib/src/painting/box_painter.dart | 8 ++++---- .../painting/{image_fit_test.dart => box_fit_test.dart} | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename packages/flutter/test/painting/{image_fit_test.dart => box_fit_test.dart} (97%) diff --git a/packages/flutter/lib/src/painting/box_painter.dart b/packages/flutter/lib/src/painting/box_painter.dart index 9127d3f26a..b353c708a2 100644 --- a/packages/flutter/lib/src/painting/box_painter.dart +++ b/packages/flutter/lib/src/painting/box_painter.dart @@ -868,8 +868,8 @@ Iterable _generateImageTileRects(Rect outputRect, Rect fundamentalRect, Im /// image. /// * `fit`: How the image should be inscribed into `rect`. If null, the /// default behavior depends on `centerSlice`. If `centerSlice` is also null, -/// the default behavior is [ImageFit.scaleDown]. If `centerSlice` is -/// non-null, the default behavior is [ImageFit.fill]. See [ImageFit] for +/// the default behavior is [BoxFit.scaleDown]. If `centerSlice` is +/// non-null, the default behavior is [BoxFit.fill]. See [BoxFit] for /// details. /// * `repeat`: If the image does not fill `rect`, whether and how the image /// should be repeated to fill `rect`. By default, the image is not repeated. @@ -885,7 +885,7 @@ Iterable _generateImageTileRects(Rect outputRect, Rect fundamentalRect, Im /// exactly cover the destination rectangle while maintaining their relative /// positions. /// * `alignment`: How the destination rectangle defined by applying `fit` is -/// aligned within `rect`. For example, if `fit` is [ImageFit.contain] and +/// aligned within `rect`. For example, if `fit` is [BoxFit.contain] and /// `alignment` is [FractionalOffset.bottomRight], the image will be as large /// as possible within `rect` and placed with its bottom right corner at the /// bottom right corner of `rect`. @@ -1043,7 +1043,7 @@ class BackgroundImage { /// backgroundColor: const Color(0xff7c94b6), /// backgroundImage: new BackgroundImage( /// image: new ExactAssetImage('images/flowers.jpeg'), -/// fit: ImageFit.cover, +/// fit: BoxFit.cover, /// ), /// border: new Border.all( /// color: Colors.black, diff --git a/packages/flutter/test/painting/image_fit_test.dart b/packages/flutter/test/painting/box_fit_test.dart similarity index 97% rename from packages/flutter/test/painting/image_fit_test.dart rename to packages/flutter/test/painting/box_fit_test.dart index bc715bfa3b..1767cab64b 100644 --- a/packages/flutter/test/painting/image_fit_test.dart +++ b/packages/flutter/test/painting/box_fit_test.dart @@ -7,7 +7,7 @@ import 'package:flutter/painting.dart'; import 'package:test/test.dart'; void main() { - test('applyImageFit', () { + test('applyBoxFit', () { FittedSizes result; result = applyBoxFit(BoxFit.scaleDown, const Size(100.0, 1000.0), const Size(200.0, 2000.0));