Converts a List<int> to a Uint8List.
List<int>
Attempts to cast to a Uint8List first to avoid creating an unnecessary copy.
Uint8List asUint8List() => tryAs<Uint8List>(this) ?? Uint8List.fromList(this);