Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

UIP-3014 Warn when key uses default toString impl

Open
#135 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
dart
Domain
frontend

Research direction

Locate the key-handling entry point and the existing console-warning path, then reproduce the two Foo examples from the issue. The work is done when values using Dart's default object toString form trigger a console warning while other key values continue to work.

Written by the indexing model from the issue text.

Description

With key being dynamic and toString-ing values, it's easy to pass in any object.

It's also easy to pass in objects with non-unique toString implementations, such as the default Object.toString, and not notice that the value won't help when keying.

class Foo {
  final bar;
  Foo(this.bar);
}
..key = new Foo(1) // Uses "Instance of 'Foo'" as key
..key = new Foo(2) // Uses "Instance of 'Foo'" as key

We should check whether values like this are specified (perhaps via a regex, like ^Instance of '[_\$a-zA-Z0-9]+'$) and warn in the console.

Dominant language
Dart
Stars
432
Forks
57
Avg merge
12m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Workiva/over_react

All issues in Workiva/over_react

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.