Skip to content

Docs for avoid_type_to_string are confusing; what type? #58891

Open

Description

@srawlins

Describe the issue

The docs say

DO avoid calls to .toString() in production code, since it does not contractually return the user-defined name of the Type (or underlying class).

What type? I think calling .toString() is extremely safe and dependable, especially if I override with my own implementation.

This probably intended to discuss Type.toString().

Activity

  1. bwilkerson commented on Oct 5, 2022

    @bwilkerson
    Member

    Correct. The replacement for the docs should definitely make this more clear.

  2. erlangparasu commented on Apr 26, 2024

    @erlangparasu

    any updates?

  3. srawlins commented on Apr 26, 2024

    @srawlins
    MemberAuthor

    No updates

  4. added
    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
    and removed on Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagetype-documentationA request to add or improve documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions