formbricks library
Formbricks Flutter SDK.
Public entry point. Drop the Formbricks widget into your tree to
initialize the SDK and render targeted in-app surveys, and call
Formbricks.track(...) to trigger code actions. Initialization, the command
queue, config, API client and expiry ticker live behind the facade.
Classes
- ApiErrorResponse
-
A normalized API error returned by
ApiClient. Distinct from FormbricksError because the API layer preserves the raw servercodestring (which may be wider than FormbricksErrorCode). -
Err<
T, E> - The error variant of Result, holding an error.
- Formbricks
- The Formbricks SDK facade and drop-in host widget.
-
Ok<
T, E> - The success variant of Result, holding a value.
-
Result<
T, E> - A Rust-style result type: either an Ok value or an Err error.
Enums
- FormbricksErrorCode
- Stable error codes used across the SDK. The wire value matches the string the backend uses, so logs and tests stay comparable.
- LogLevel
-
Log verbosity.
error(default) logs only errors;debuglogs everything.
Exceptions / Errors
- FormbricksError
- Base type for all SDK errors. Sealed so callers can switch exhaustively.
- FormbricksSetupError
-
Thrown when the very first
setupattempt fails and the SDK is placed into the error-cooldown state. - InternalError
- An internal SDK failure that is not a network/backend error.
- InvalidCodeError
- An invalid code action was supplied. Reserved for the track feature.
- MissingFieldError
-
A required field (
appUrl,workspaceId, …) was missing or invalid. - NetworkError
- A network failure or non-2xx response while talking to the backend.
- NotSetupError
-
The SDK was used before
setupcompleted. - SetupCooldownError
-
Returned by
setup()when it is called while the SDK is still inside the error cooldown that a previous failed setup opened. The SDK is not set up; callers should retry after retryAt. - UnsupportedAttributeValueError
- An attribute value used an unsupported type.