• Vyacheslav Egorov's avatar
    Change GlobalObjectKey.toString to strip away State<StatefulWidget>. (#14558) · d20125c3
    Vyacheslav Egorov authored
    This allows const GlobalObjectKey(0) to be concisely formatted as
    [GlobalObjectKey int#0000] in both Dart 2 and Dart 1 modes.
    
    Without this change it would be formatted as
    [GlobalObjectKey<State<StatefulWidget>> int#0000] because in Dart 2
    types are instantiated to bounds.
    
    In addition to retaining general readability this also fixes few
    tests that rely on this short string representation (see
    test/widgets/global_keys_duplicated_test.dart).
    d20125c3
framework_test.dart 20.6 KB