Skip to content

Offer reasonable 1D replacement for .scale and .scaled #350

@timcreatedit

Description

@timcreatedit

After the deprecation of Matrix4.scale() and Matrix4.scaled(), it seems like there is no way to easily write one of the most common use-cases in Flutter anymore. There should be a replacement for uniformly scaling a matrix by a single factor in x y and z.

For example:

Widget build(BuildContext context) {
    return AnimatedContainer(
        // ...
        transform: Matrix4.identity().scaledByFactor(active ? 2 : 1);
        // ...
    );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions