Skip to content

[mustache_template] Improve type specificity #174742

@stuartmorgan-g

Description

@stuartmorgan-g

The mustache_template code was forked from a project that rarely used explicit typing, even for things like function parameters, so there was a lot of implicit dynamic typing. To meet the analyzer requirements of flutter/packages, I added some explicit types, but in many cases it was just replacing an implicit dynamic with Object? to minimize the chance of regressions during import.

Over time, to improve the maintainability of the code, it would be good to audit the uses of dynamic and Object? in the package to see where we can add more specific types. This will need to be done carefully though, as it will create the potentially for regressions due to casting failures if there are edge cases where the actual runtime types are more broad than realized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectp: mustache_templateThe mustache_template packagepackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions