Closed Mohamed-kamel-1994 closed 1 year ago
Please provide me your code you tried with.
Please provide me your code you tried with.
// note that i'm using getx // InternetConnectionChecker to check if ther is internet // the error in this line Uint8List image = await ai.runAI(query, AIStyle.noStyle, Resolution.r1x1);
// controller class `class MainController extends GetxController{
final TextEditingController textEditingController = TextEditingController(); final AI ai = AI();
RxList
bool run = false;
Future generateImage() async { if (run == true) return; run = true;
bool result = await InternetConnectionChecker().hasConnection;
if(result == false) return;
String query = textEditingController.text;
textEditingController.clear();
widgets.add(Text(query));
Uint8List image = await ai.runAI(query, AIStyle.noStyle, Resolution.r1x1);
widgets.add(Image.memory(image));
run = false;
print("========== done ==============");
}
@override
void dispose() {
textEditingController.dispose();
super.dispose();
}
}
// view
final controller = Get.put(MainController());
return Scaffold(
body: SafeArea(
child: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.all(ValuesRes.v8),
child: Column(
children: [
Expanded(
child: GetX
Please update your package to the latest version
brain_fusion: ^0.1.1
After this please let me know if you getting an error. Thanks.
Please update your package to the latest version
brain_fusion: ^0.1.1
After this please let me know if you getting an error. Thanks.
I already use it
get: ^4.6.5 brain_fusion: ^0.1.1 lottie: ^2.6.0 url_launcher: ^6.1.12 internet_connection_checker: ^1.0.0+1
I tried the app on the emulator and on a real device, but the same problem
Is it possible that the geographical location is the cause of the problem because I work from Kingdom of Saudi Arabia ?
No, i don't think that's the problem. Let's see if that is the cause. Clone the example project that i put on this package and run it then share the video or the screenshots.
https://github.com/dj-yacine-flutter/brain_fusion/tree/master/example
No, i don't think that's the problem. Let's see if that is the cause. Clone the example project that i put on this package and run it then share the video or the screenshots.
https://github.com/dj-yacine-flutter/brain_fusion/tree/master/example
the same error
/// The [_generate] function to generate image data. Future<Uint8List> _generate(String query) async { /// Call the runAI method with the required parameters. Uint8List image = await _ai.runAI( query, AIStyle.anime, Resolution.r1x1, ); return image; }
add
add in android/app/src/main/AndroidManifest.xml and then turn off your emulator then start it again. Hope this helps.
what shoud i add !!
add in android/app/src/main/AndroidManifest.xml and then turn off your emulator then start it again. Hope this helps.
this is AndroidManifest from my app what do you suggests to do
every time i'm trying to run Uint8List image = await ai.runAI(query, AIStyle.noStyle, Resolution.r1x1);
i get this error => throw createError(response, "Failed host lookup: '$host'"); // host : "api.fusionbrain.ai"
i did every step like the Example