skip to Main Content

this is my image_cubit.dart
enter image description here

if i add third positional argument resolution resolution in the above then i will get error at home_page.dart at this line

enter image description here

enter image description here

pls help me if anyone can help

i want anyone that can help me in resolving my error

2

Answers


  1. If you go to the source code of the library, you will see that the method runAI requires three arguments:

    Future<Uint8List> runAI(
        String query,
        AIStyle style,
        Resolution resolution,
      )
    

    so you need to pass in a Resolution object in your method call.

    I.E.

    Uint8List image = await _ai.runAI(
          query,
          AIStyle.sovietCartoon,
          Resolution.r1x1,
        );
    
    Login or Signup to reply.
  2. did you solve it? i need some help with this project too, can i connect with you?

    the author of this code is using brain_fusion api version 0.0.8, when I (and maybe you too) are using 0.1.1.
    in 0.0.8 we don’t need 3rd argument, but project didn’t work on that version (does not create an image, the problem is in the API i think)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search