Skip to content

double.toString(1.0) is inconsistent on web/desktop #118207

@HansMuller

Description

@HansMuller

This came up in testing some toString() methods. For double d = 1': on desktop d.toString()` is "1.0", but on web it's "1".

void main() {
  final double d = 1.0; 
  print(d.toString()); prints 1 on web, 1.0 on desktop
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions