diff --git a/example/image_classification_mobilenet/pubspec.yaml b/example/image_classification_mobilenet/pubspec.yaml index 468ce3f..9b2a9f2 100644 --- a/example/image_classification_mobilenet/pubspec.yaml +++ b/example/image_classification_mobilenet/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=3.3.0 <4.0.0" dependencies: camera: ^0.10.5+2 diff --git a/example/reinforcement_learning/pubspec.yaml b/example/reinforcement_learning/pubspec.yaml index 33caf5d..bb88513 100644 --- a/example/reinforcement_learning/pubspec.yaml +++ b/example/reinforcement_learning/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=3.3.0 <4.0.0" dependencies: flutter: diff --git a/example/style_transfer/pubspec.yaml b/example/style_transfer/pubspec.yaml index fca2d1b..3bebd0a 100644 --- a/example/style_transfer/pubspec.yaml +++ b/example/style_transfer/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=3.3.0 <4.0.0" dependencies: flutter: diff --git a/example/super_resolution_esrgan/pubspec.yaml b/example/super_resolution_esrgan/pubspec.yaml index dc5901d..7a6c6a6 100644 --- a/example/super_resolution_esrgan/pubspec.yaml +++ b/example/super_resolution_esrgan/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=3.3.0 <4.0.0" dependencies: flutter: diff --git a/example/text_classification/pubspec.yaml b/example/text_classification/pubspec.yaml index 4dd475d..c3ab61d 100644 --- a/example/text_classification/pubspec.yaml +++ b/example/text_classification/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=3.3.0 <4.0.0" dependencies: flutter: diff --git a/lib/src/tensor.dart b/lib/src/tensor.dart index 2283585..f2f5176 100644 --- a/lib/src/tensor.dart +++ b/lib/src/tensor.dart @@ -55,8 +55,9 @@ class Tensor { /// Underlying data buffer as bytes. Uint8List get data { final data = cast(tfliteBinding.TfLiteTensorData(_tensor)); - return UnmodifiableUint8ListView( - data.asTypedList(tfliteBinding.TfLiteTensorByteSize(_tensor))); + return data + .asTypedList(tfliteBinding.TfLiteTensorByteSize(_tensor)) + .asUnmodifiableView(); } /// Quantization Params associated with the model, [only Android] diff --git a/pubspec.yaml b/pubspec.yaml index 8c5a24f..b7c80fd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,7 @@ version: 0.10.3 homepage: https://github.com/tensorflow/flutter-tflite environment: - sdk: '>=2.18.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' flutter: '>=1.10.0' dependencies: