CodeClientConfig constructor
CodeClientConfig({
- required String client_id,
- required List<
String> scope, - bool? include_granted_scopes,
- Uri? redirect_uri,
- CodeClientCallbackFn? callback,
- String? state,
- bool? enable_granular_consent,
- @Deprecated('Use `enable_granular_consent` instead.') bool? enable_serial_consent,
- String? login_hint,
- String? hd,
- UxMode? ux_mode,
- bool? select_account,
- ErrorCallbackFn? error_callback,
Constructs a CodeClientConfig object in JavaScript.
The callback
property must be a Dart function and not a JS function.
Implementation
factory CodeClientConfig({
required String client_id,
required List<String> scope,
bool? include_granted_scopes,
Uri? redirect_uri,
CodeClientCallbackFn? callback,
String? state,
bool? enable_granular_consent,
@Deprecated('Use `enable_granular_consent` instead.')
bool? enable_serial_consent,
String? login_hint,
String? hd,
UxMode? ux_mode,
bool? select_account,
ErrorCallbackFn? error_callback,
}) {
assert(scope.isNotEmpty);
return CodeClientConfig._toJS(
client_id: client_id.toJS,
scope: scope.join(' ').toJS,
include_granted_scopes: include_granted_scopes?.toJS,
redirect_uri: redirect_uri?.toString().toJS,
callback: callback?.toJS,
state: state?.toJS,
enable_granular_consent: enable_granular_consent?.toJS,
enable_serial_consent: enable_serial_consent?.toJS,
login_hint: login_hint?.toJS,
hd: hd?.toJS,
ux_mode: ux_mode.toString().toJS,
select_account: select_account?.toJS,
error_callback: error_callback?.toJS,
);
}