Description
I was instructed by DanTup to post this issue here as well. The original is fully described below:
Describe the problem
Variable hover should show the origin of the given type.This is pretty important in cases where there are types with the same name and they don't have any relation to one another like the sample, but I also see significance if they extend one another and they are inverted in some way.
This would also help if the variables are not directly created like this but actually returned from different functions and is not clear which of them is being returned.
To Reproduce
Sample:
main.dart
import 'a.dart' as a; void main() { final aFromA = a.A(); final list = [A(), A(), A()]; for (final value in list) { } } class A {}
a.dart
class A {}Steps to reproduce the behavior:
- Create an empty project and add both files.
- Hover over the
aFromA
variable- Hover over
value
variable- Hover over
list
variableWhat happens in all of these cases is displayed below in the screenshot session.
Expected behavior
I expected the type hover to differentiate betweenA
from themain.dart
file and froma.dart
file.Aditional info
This info is already shown if you hover the actual constructor.