AiutaConfiguration class
The configuration object that is used to configure the Aiuta SDK.
- Annotations
-
- @JsonSerializable()
Constructors
-
AiutaConfiguration({required AiutaMode mode, required AiutaAuthentication authentication, required AiutaToggles toggles, required AiutaLanguage language, required AiutaListeners listeners, AiutaDataProvider? dataProvider, AiutaTheme? theme, Future<
void> onAnalyticsEvent(AiutaAnalyticEvent)?}) - Create a new instance of AiutaConfiguration.
-
AiutaConfiguration.fromJson(Map<
String, dynamic> json) -
Create a new instance of AiutaConfiguration from a json map.
factory
Properties
- authentication → AiutaAuthentication
-
Authentication configuration.
This is required to authenticate Aiuta to use digital try-on API with your credentials.
Supported authentication methods are ApiKey and JWT.
When using JWT, only sensitive requests (such as starting virtual try-on) are authenticated with JWT.
Other requests are authenticated with your subscription id.
Please see Aiuta API documentation for instructions on how to get your credentials.
final
- dataProvider → AiutaDataProvider?
-
Optional data provider to manage data of the Aiuta SDK.
This allows you to store and retrieve data (such as user consent, uploaded images, generation history) from your own data source.
If not provided, the Aiuta SDK uses the built-in data provider that stores data in local storage on the device.
Default data storage is not linked to the user and is not shared between different devices. Will be deleted when the app is uninstalled.
Creating a custom data provider allows you to store data in your own data source and link it to the user.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- language → AiutaLanguage
-
Language configuration.
You can use StandardLanguage to use the built-in localization provided by the Aiuta SDK.
Or you can create your own CustomLanguage implementation to provide custom localization.
final
- listeners → AiutaListeners
-
Listeners for various significant user actions in the Aiuta SDK.
final
- mode → AiutaMode
-
Presentation mode of the Aiuta SDK.
final
-
onAnalyticsEvent
→ Future<
void> Function(AiutaAnalyticEvent)? -
Optional listener for analytics events.
This listener is called when an analytics event is triggered by the Aiuta SDK.
You can use this listener to send analytics events to your analytics provider.
For example, you can use Firebase Analytics, Google Analytics, or any other analytics provider.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- theme → AiutaTheme?
-
Theme configuration.
You can use the built-in AiutaTheme to use the default theme provided by the Aiuta SDK.
It uses system default fonts and Aiuta color scheme and built-in icons.
To use the default theme, you can provide null or omit this field.
Alternatively, you can provide your own custom theme by creating a custom AiutaTheme providing your own fonts, colors, shapes, icons, etc.
final
- toggles → AiutaToggles
-
Toggles some features of the Aiuta SDK behavior.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert this object to a json map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited