flutter_tools: Prefer using .of() over .from() when possible (#55250)

Prefer using `.of()` (which is statically type-checked) over
`.from()` (which is dynamically type-checked) when possible.
This commit is contained in:
James D. Lin
2020-04-21 22:09:50 -07:00
committed by GitHub
parent d2bd30e272
commit 566c1d1124
19 changed files with 27 additions and 27 deletions

View File

@@ -585,7 +585,7 @@ class BasicMock {
final List<String> messages = <String>[];
void expectMessages(List<String> expectedMessages) {
final List<String> actualMessages = List<String>.from(messages);
final List<String> actualMessages = List<String>.of(messages);
messages.clear();
expect(actualMessages, unorderedEquals(expectedMessages));
}