Skip to content

Image Widget: Displaying Image.asset with an explicit scale does not work #18679

@sir-boformer

Description

@sir-boformer

Example application: https://github.com/sir-boformer/flutter_image_bugs/blob/master/lib/main.dart


When I try to load an image variant with an explicit scale, Flutter always gets the default 1.0x variant:

new Image.asset('images/test.png', scale: 3.0, width: 48.0, height: 48.0)

The automatic variant selection (scale: null) works correctly:

new Image.asset('images/test.png', width: 48.0, height: 48.0)

screenshot_1529596875

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions