Skip to main content

SignUp

SignUp is a pre-built Flutter widget that drives the full registration flow using the ThunderID Flow Execution API. It renders each registration step as it arrives and advances through the flow until the account is created and the user is signed in.

import 'package:thunderid_flutter/thunderid_flutter.dart';

SignUp(
applicationId: '<your-application-id>',
onComplete: () {
ThunderIDProvider.of(context).refresh();
},
onError: (error) => print('Sign up failed: $error'),
)

SignUp Parameters

ParameterTypeRequiredDescription
applicationIdStringThe Application ID from the ThunderID console. Used to initiate the Flow Execution API.
onCompleteVoidCallback?Called when registration completes and the user is signed in.
onErrorvoid Function(dynamic)?Called if the flow fails or an error occurs.

BaseSignUp

BaseSignUp exposes the raw SignUpState to a builder function, giving full UI control while the SDK manages the registration loop.

BaseSignUp(
applicationId: '<your-application-id>',
onComplete: () => ThunderIDProvider.of(context).refresh(),
builder: (context, state) {
return Column(
children: [
for (final input in state.inputs)
TextField(
decoration: InputDecoration(labelText: input.label),
obscureText: input.type == 'password',
onChanged: (value) => state.setValue(input.name, value),
),
ElevatedButton(
onPressed: state.isLoading ? null : state.submit,
child: state.isLoading
? const CircularProgressIndicator()
: const Text('Create Account'),
),
if (state.error != null) Text(state.error!),
],
);
},
)

BaseSignUp Parameters

ParameterTypeRequiredDescription
applicationIdStringThe Application ID for the flow.
onCompleteVoidCallback?Called on successful completion.
onErrorvoid Function(dynamic)?Called on failure.
builderWidget Function(BuildContext, SignUpState)Builder receiving the current SignUpState.

SignUpState

SignUpState mirrors the shape of SignInState and is passed to the BaseSignUp builder on every update.

Property/MethodTypeDescription
inputsList<FlowInput>Form fields for the current registration step.
actionsList<FlowAction>Available actions for the current step.
isLoadingbooltrue while a step is executing.
errorString?Human-readable error from the last step.
flowStatusFlowStatusCurrent flow status.
setValue(name, value)voidSet a field value.
submit()Future<void>Submit the current step.
executeAction(action)Future<void>Execute a FlowAction.
ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© WSO2 LLC. All rights reserved.Privacy PolicyCookie Policy