ai_color

Last updated:

0 purchases

ai_color Image
ai_color Images
Add to Cart

Description:

ai color

Name #
AIColor #
Description #
This is a package that will help users quickly find the necessary colors for their projects using
only a text description
Demo #
Demo video that shows the work of our package
Getting started #
Create an instance of variable for further convenient use
AIColor aiColor = AIColor("apiKey");//instead of "apikey" use your own API key
copied to clipboard
Usage #
Using an instance of AIColor and FutureBuilder, you can create various Widgets and set them the
desired color with our library
Widget newWidget(String text){
return FutureBuilder(
future: aiColor.getColor(text),
builder: (BuildContext context, AsyncSnapshot<Color?> snapshot) {
if(snapshot.connectionState == ConnectionState.active ||
snapshot.connectionState == ConnectionState.waiting){
return const Center(child: CircularProgressIndicator(),);
}
if(snapshot.connectionState == ConnectionState.done){
if(snapshot.hasError){
return const Center(child: Text("ERROR"));
}
else {
return Center(
child: Container(
width: 100,
height: 100,
color: snapshot.data,
),
);
}
}
return const Center(child: Text("wait"),);
},

);
}
copied to clipboard
Instead of the getColor function, you can use updateColor, which does not use the database,
but sends a new request to ChatGPT each time
Contributors #

Ilnaz Magizov (@mazik_il)
Daniil Zimin (@daniilzimin4)

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.