mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix UNNECESSARY_TYPE_CHECK_TRUE (flutter/engine#28611)
* Fix UNNECESSARY_TYPE_CHECK_TRUE * Fix two more places.
This commit is contained in:
parent
0c4124a7e1
commit
463ebf640f
@ -23,7 +23,7 @@ void main() {
|
||||
|
||||
ByteData _makeByteData(String str) {
|
||||
final Uint8List list = utf8.encode(str) as Uint8List;
|
||||
final ByteBuffer buffer = list is Uint8List ? list.buffer : Uint8List.fromList(list).buffer;
|
||||
final ByteBuffer buffer = list.buffer;
|
||||
return ByteData.view(buffer);
|
||||
}
|
||||
|
||||
|
||||
@ -49,9 +49,7 @@ class ShellLauncher {
|
||||
|
||||
ShellLauncher(this.shellExecutablePath, this.mainDartPath, this.startPaused,
|
||||
List<String> extraArgs) {
|
||||
if (extraArgs is List) {
|
||||
args.addAll(extraArgs);
|
||||
}
|
||||
args.addAll(extraArgs);
|
||||
args.add(mainDartPath);
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ import 'package:litetest/litetest.dart';
|
||||
|
||||
ByteData _makeByteData(String str) {
|
||||
final Uint8List list = utf8.encode(str) as Uint8List;
|
||||
final ByteBuffer buffer = list is Uint8List ? list.buffer : Uint8List.fromList(list).buffer;
|
||||
final ByteBuffer buffer = list.buffer;
|
||||
return ByteData.view(buffer);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user