As dart 2.12 collections constructors are deprecated (Ex: `List<Foo>()`). Given that, I am aware of two ways to instantiate collections which are the following:

Set example:

```
final Set<String> fooSet = {};
final barSet = <String>{};

```

List example:

```
final List<String> fooList = [];
final barList = <String>[];

```

I would like to ask which method do you use and why (pros and cons), as my team tends to use both. We would like to come to an agreement and pick one for consistency.

**Edit:**

I am aware that both approaches are somewhat semantically different (but almost certain it would generate the same opcode), as in the first example the compiler identifies the instantiation type given the variable type and in the second the variable type is automatically assigned given the instantiation type.

```
final List<String> fooList = <String>[];

```

Would be an explicit declaration of both but might be somewhat cumbersome to write.