Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compatibility with latest 'stable' flutter build + bump min sdk to 3.3.0 #233

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading