@@ -162,6 +162,8 @@ final class NativeFloat32x4List extends Object
162
162
_storage[(index * 4 ) + 3 ] = value.w;
163
163
}
164
164
165
+ Float32x4List asUnmodifiableView () => UnmodifiableFloat32x4ListView (this );
166
+
165
167
Float32x4List sublist (int start, [int ? end]) {
166
168
var stop = _checkValidRange (start, end, this .length);
167
169
return NativeFloat32x4List ._externalStorage (
@@ -234,6 +236,8 @@ final class NativeInt32x4List extends Object
234
236
_storage[(index * 4 ) + 3 ] = value.w;
235
237
}
236
238
239
+ Int32x4List asUnmodifiableView () => UnmodifiableInt32x4ListView (this );
240
+
237
241
Int32x4List sublist (int start, [int ? end]) {
238
242
var stop = _checkValidRange (start, end, this .length);
239
243
return NativeInt32x4List ._externalStorage (
@@ -300,6 +304,8 @@ final class NativeFloat64x2List extends Object
300
304
_storage[(index * 2 ) + 1 ] = value.y;
301
305
}
302
306
307
+ Float64x2List asUnmodifiableView () => UnmodifiableFloat64x2ListView (this );
308
+
303
309
Float64x2List sublist (int start, [int ? end]) {
304
310
var stop = _checkValidRange (start, end, this .length);
305
311
return NativeFloat64x2List ._externalStorage (
@@ -407,6 +413,8 @@ final class NativeByteData extends NativeTypedData implements ByteData {
407
413
408
414
int get elementSizeInBytes => 1 ;
409
415
416
+ ByteData asUnmodifiableView () => UnmodifiableByteDataView (this );
417
+
410
418
/// Returns the floating point number represented by the four bytes at
411
419
/// the specified [byteOffset] in this object, in IEEE 754
412
420
/// single-precision binary floating-point format (binary32).
@@ -757,6 +765,8 @@ final class NativeFloat32List extends NativeTypedArrayOfDouble
757
765
758
766
Type get runtimeType => Float32List ;
759
767
768
+ Float32List asUnmodifiableView () => UnmodifiableFloat32ListView (this );
769
+
760
770
Float32List sublist (int start, [int ? end]) {
761
771
var stop = _checkValidRange (start, end, this .length);
762
772
var source =
@@ -789,6 +799,8 @@ final class NativeFloat64List extends NativeTypedArrayOfDouble
789
799
790
800
Type get runtimeType => Float64List ;
791
801
802
+ Float64List asUnmodifiableView () => UnmodifiableFloat64ListView (this );
803
+
792
804
Float64List sublist (int start, [int ? end]) {
793
805
var stop = _checkValidRange (start, end, this .length);
794
806
var source = JS ('NativeFloat64List' , '#.subarray(#, #)' , this , start, stop);
@@ -824,6 +836,8 @@ final class NativeInt16List extends NativeTypedArrayOfInt implements Int16List {
824
836
return JS <int >('!' , '#[#]' , this , index);
825
837
}
826
838
839
+ Int16List asUnmodifiableView () => UnmodifiableInt16ListView (this );
840
+
827
841
Int16List sublist (int start, [int ? end]) {
828
842
var stop = _checkValidRange (start, end, this .length);
829
843
var source = JS ('NativeInt16List' , '#.subarray(#, #)' , this , start, stop);
@@ -859,6 +873,8 @@ final class NativeInt32List extends NativeTypedArrayOfInt implements Int32List {
859
873
return JS <int >('!' , '#[#]' , this , index);
860
874
}
861
875
876
+ Int32List asUnmodifiableView () => UnmodifiableInt32ListView (this );
877
+
862
878
Int32List sublist (int start, [int ? end]) {
863
879
var stop = _checkValidRange (start, end, this .length);
864
880
var source =
@@ -895,6 +911,8 @@ final class NativeInt8List extends NativeTypedArrayOfInt implements Int8List {
895
911
return JS <int >('!' , '#[#]' , this , index);
896
912
}
897
913
914
+ Int8List asUnmodifiableView () => UnmodifiableInt8ListView (this );
915
+
898
916
Int8List sublist (int start, [int ? end]) {
899
917
var stop = _checkValidRange (start, end, this .length);
900
918
var source = JS <NativeInt8List >('!' , '#.subarray(#, #)' , this , start, stop);
@@ -934,6 +952,8 @@ final class NativeUint16List extends NativeTypedArrayOfInt
934
952
return JS <int >('!' , '#[#]' , this , index);
935
953
}
936
954
955
+ Uint16List asUnmodifiableView () => UnmodifiableUint16ListView (this );
956
+
937
957
Uint16List sublist (int start, [int ? end]) {
938
958
var stop = _checkValidRange (start, end, this .length);
939
959
var source =
@@ -971,6 +991,8 @@ final class NativeUint32List extends NativeTypedArrayOfInt
971
991
return JS <int >('!' , '#[#]' , this , index);
972
992
}
973
993
994
+ Uint32List asUnmodifiableView () => UnmodifiableUint32ListView (this );
995
+
974
996
Uint32List sublist (int start, [int ? end]) {
975
997
var stop = _checkValidRange (start, end, this .length);
976
998
var source =
@@ -1010,6 +1032,9 @@ final class NativeUint8ClampedList extends NativeTypedArrayOfInt
1010
1032
return JS <int >('!' , '#[#]' , this , index);
1011
1033
}
1012
1034
1035
+ Uint8ClampedList asUnmodifiableView () =>
1036
+ UnmodifiableUint8ClampedListView (this );
1037
+
1013
1038
Uint8ClampedList sublist (int start, [int ? end]) {
1014
1039
var stop = _checkValidRange (start, end, this .length);
1015
1040
var source =
@@ -1060,6 +1085,8 @@ final class NativeUint8List extends NativeTypedArrayOfInt implements Uint8List {
1060
1085
return JS <int >('!' , '#[#]' , this , index);
1061
1086
}
1062
1087
1088
+ Uint8List asUnmodifiableView () => UnmodifiableUint8ListView (this );
1089
+
1063
1090
Uint8List sublist (int start, [int ? end]) {
1064
1091
var stop = _checkValidRange (start, end, this .length);
1065
1092
var source =
0 commit comments