{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"SDK Reference","type":"markdown"},"seo":{"title":"Functions","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com/"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"functions","__idx":0},"children":["Functions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initializesdk","__idx":1},"children":["initializeSDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["initializeSDK"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializes the plugin using platform-specific configuration files (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransmitSecurity.plist"]}," on iOS, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strings.xml"]}," values on Android). This is the recommended initialization approach."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns","__idx":2},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if initialization succeeded."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example","__idx":3},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\nawait accountProtection.initializeSDK();\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initialize","__idx":4},"children":["initialize"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["initialize"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{configuration, userId}"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializes the plugin with explicit parameters. Use this when you need to provide credentials programmatically instead of relying on platform configuration files."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":5},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Your client identifier"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["API base URL for your environment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configuration"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/flutter-ts-accountprotection/interfaces/tsinitsdkconfiguration"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSInitSDKConfiguration?"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional configuration for location tracking"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional user ID to set during initialization"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-1","__idx":6},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if initialization succeeded."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-1","__idx":7},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\nawait accountProtection.initialize(\n  'YOUR_CLIENT_ID',\n  'https://api.transmitsecurity.io/risk-collect/',\n  configuration: TSInitSDKConfiguration(\n    enableLocationEvents: true,\n  ),\n  userId: 'user-123',\n);\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"triggeraction","__idx":8},"children":["triggerAction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["triggerAction"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{options, locationConfig, customAttributes}"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/flutter-ts-accountprotection/interfaces/tssetactionresponse"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSSetActionResponse"]}]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Reports a user action event and returns an action token. The action token should be passed to your backend to fetch risk recommendations via the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/risk/recommendations.openapi/other/getriskrecommendation"},"children":["Recommendation API"]},". This method does not throw on failure—check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.success"]}," and use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result.actionToken"]}," when successful."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-1","__idx":9},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The type of user action to report (use ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/flutter-ts-accountprotection/enums/tsaction"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSAction"]}]}," enum values)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/flutter-ts-accountprotection/interfaces/tsactioneventoptions"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSActionEventOptions?"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Additional context for the action event"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locationConfig"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/flutter-ts-accountprotection/interfaces/tslocationconfig"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSLocationConfig?"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Controls location data collection for this action (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/report_geolocation"},"children":["Track geolocation"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customAttributes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, dynamic>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Additional contextual data for the action; must match the schema defined in the Portal (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/action-attributes"},"children":["Custom attributes"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-2","__idx":10},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-ref/flutter-ts-accountprotection/interfaces/tssetactionresponse"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSSetActionResponse"]}]},">"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-2","__idx":11},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\n\nfinal response = await accountProtection.triggerAction(\n  TSAction.login.name,\n  options: TSActionEventOptions(\n    correlationId: 'CORRELATION_ID',\n    claimedUserId: '91e25bea0c...', // hashed email\n    claimedUserIdType: TSClaimedUserIdType.email,\n    referenceUserId: 'REFERENCE_USER_ID',\n  ),\n  locationConfig: TSLocationConfig(mode: 'default'),\n  customAttributes: {'userLevel': 'premium'},\n);\nfinal actionToken = response.actionToken;\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setauthenticateduser","__idx":12},"children":["setAuthenticatedUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setAuthenticatedUser"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{options}"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sets the user context for all subsequent events in the session (or until the user is explicitly cleared). It should be called only after you've fully authenticated the user (including, for example, any 2FA that was required). On Android, this call requires a foreground Activity—call it after the app UI is running, not during early startup."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-2","__idx":13},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Opaque identifier of the user in your system"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, dynamic>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional user attributes"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-3","__idx":14},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if the call succeeded."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-3","__idx":15},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\nawait accountProtection.setAuthenticatedUser('user-123');\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"clearuser","__idx":16},"children":["clearUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["clearUser"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Clears the user context for all subsequent events in the mobile session. The user is automatically cleared once the session expires or in case of a new login action."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-4","__idx":17},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if the call succeeded."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-4","__idx":18},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\nawait accountProtection.clearUser();\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"getsessiontoken","__idx":19},"children":["getSessionToken"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getSessionToken"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns a device session token that can be used to trigger action events via the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/quick_start_backendapi"},"children":["Backend API"]},". The session token binds user interactions to their device and is required for backend integrations. Call this after plugin initialization and before triggering events."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-5","__idx":20},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The session token."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-5","__idx":21},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\nfinal sessionToken = await accountProtection.getSessionToken();\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"logpageload","__idx":22},"children":["logPageLoad"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["logPageLoad"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageName"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tracks screen navigation events for behavioral data collection. For automatic page-load tracking, use the built-in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DrsCore.navigationObserver"]}," instead (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/risk/quick_start_flutter#step-5-wire-navigation-observer"},"children":["quick start"]},"). Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["logPageLoad"]}," only if you need to report navigation events manually."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-3","__idx":23},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The name of the screen or page the user navigated to"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-6","__idx":24},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if the call succeeded."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-6","__idx":25},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\nawait accountProtection.logPageLoad('LoginScreen');\nawait accountProtection.logPageLoad('Dashboard');\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setloglevel","__idx":26},"children":["setLogLevel"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setLogLevel"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isLogEnabled"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enables or disables verbose plugin logging for debugging purposes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-4","__idx":27},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isLogEnabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to enable debug logging"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-7","__idx":28},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Indicates if the call succeeded."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-7","__idx":29},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'package:flutter_ts_account_protection/flutter_ts_account_protection.dart';\n\nfinal accountProtection = FlutterTsAccountProtection();\nawait accountProtection.setLogLevel(true); // Enable for debugging\nawait accountProtection.setLogLevel(false); // Disable for production\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"style","attributes":{},"children":["\ntable th:first-of-type {\n    width: 30%;\n}\ntable th:nth-of-type(2) {\n    width: 30%;\n}\ntable th:nth-of-type(3) {\n    width: 40%;\n}\n"]}]},"headings":[{"value":"Functions","id":"functions","depth":1},{"value":"initializeSDK","id":"initializesdk","depth":2},{"value":"Returns","id":"returns","depth":3},{"value":"Example","id":"example","depth":3},{"value":"initialize","id":"initialize","depth":2},{"value":"Parameters","id":"parameters","depth":3},{"value":"Returns","id":"returns-1","depth":3},{"value":"Example","id":"example-1","depth":3},{"value":"triggerAction","id":"triggeraction","depth":2},{"value":"Parameters","id":"parameters-1","depth":3},{"value":"Returns","id":"returns-2","depth":3},{"value":"Example","id":"example-2","depth":3},{"value":"setAuthenticatedUser","id":"setauthenticateduser","depth":2},{"value":"Parameters","id":"parameters-2","depth":3},{"value":"Returns","id":"returns-3","depth":3},{"value":"Example","id":"example-3","depth":3},{"value":"clearUser","id":"clearuser","depth":2},{"value":"Returns","id":"returns-4","depth":3},{"value":"Example","id":"example-4","depth":3},{"value":"getSessionToken","id":"getsessiontoken","depth":2},{"value":"Returns","id":"returns-5","depth":3},{"value":"Example","id":"example-5","depth":3},{"value":"logPageLoad","id":"logpageload","depth":2},{"value":"Parameters","id":"parameters-3","depth":3},{"value":"Returns","id":"returns-6","depth":3},{"value":"Example","id":"example-6","depth":3},{"value":"setLogLevel","id":"setloglevel","depth":2},{"value":"Parameters","id":"parameters-4","depth":3},{"value":"Returns","id":"returns-7","depth":3},{"value":"Example","id":"example-7","depth":3}],"frontmatter":{"seo":{"title":"Functions"}},"lastModified":"2026-07-01T11:46:06.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-ref/flutter-ts-accountprotection/drs","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}