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

Build failed | solving by adding imports | Error: Type 'Uint8List' not found. | Error: 'MultipartFile' isn't a type. #184

Open
Stefano-Trinca opened this issue Jun 26, 2024 · 0 comments

Comments

@Stefano-Trinca
Copy link

Stefano-Trinca commented Jun 26, 2024

I have e build failure with the following errors:

    Uint8List? fileData,
    ^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/dart_openai-5.1.0/lib/src/core/networking/client.dart:548:5: Error: 'Uint8List' isn't a type.
    Uint8List? fileData,
    ^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/dart_openai-5.1.0/lib/src/core/networking/client.dart:563:5: Error: 'MultipartFile' isn't a type.
    MultipartFile multiPartFile;
    ^^^^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/dart_openai-5.1.0/lib/src/instance/audio/audio.dart:52:5: Error: Type 'Uint8List' not found.
    Uint8List? fileData,
    ^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/dart_openai-5.1.0/lib/src/instance/audio/audio.dart:52:5: Error: 'Uint8List' isn't a type.
    Uint8List? fileData,
    ^^^^^^^^^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

This can be solved by adding the: import 'dart:typed_data'; on audio.dart and client.dart files.

Then in the client.dart file in the 565 line is missin http. before MultipartFile: http.MultipartFile multiPartFile;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant