Skip to content

Commit

Permalink
Merge pull request #233 from ptgms/main
Browse files Browse the repository at this point in the history
fix compatibility with latest 'stable' flutter build + bump min sdk to 3.3.0
  • Loading branch information
PaulTR authored Jul 31, 2024
2 parents 12be124 + 898c8b5 commit 83a2013
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example/image_classification_mobilenet/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/reinforcement_learning/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion example/style_transfer/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion example/super_resolution_esrgan/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion example/text_classification/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions lib/src/tensor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ class Tensor {
/// Underlying data buffer as bytes.
Uint8List get data {
final data = cast<Uint8>(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]
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 83a2013

Please sign in to comment.