> For the complete documentation index, see [llms.txt](https://even-financial.gitbook.io/developer-center/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://even-financial.gitbook.io/developer-center/marketplace-integrations/mobile-sdks/unified-marketplace/flutter.md).

# Flutter

## Overview

Personal Loans and Credit Cards use the **same Flutter SDK and the same `EngineSDK` widget** — under the hood, it's identical. You choose which product to render by passing the matching `channel`, `zone`, and `productTypes` for your integration.

## Sample Basic Implementation

You cannot pass two bearer tokens to one `EngineSDK` instance. Use separate launches for product-specific tokens, or one token configured for a combined marketplace.

```dart
import 'package:engine_mobile_flutter_sdk/engine_mobile_flutter_sdk.dart';
import 'package:engine_mobile_flutter_sdk/api_models.dart' as engine;

EngineSDK(
  // channel, zone, and productTypes depend on the product you're integrating.
  // Get your channel and zone values from your Partner Manager.
  channel: 'your-channel',
  zone: 'your-zone',
  productTypes: const [engine.ProductType.loan], // or [engine.ProductType.creditCard] for Credit Cards
  onExit: (_) {
    debugPrint("Exit triggered from SDK");
    Navigator.pop(context);
  },
  // ...optional prefill props and event handlers
)
```

## Prepopulating Lead Data

A `bearerToken` is required when using prefill. If your Personal Loans and Credit Cards experiences are configured separately, use the corresponding bearer token for each product.

Pass only the fields you have — omitted fields are collected from the user in-flow. The comment beside each class/field notes which product it applies to.

### Using Bearer Tokens

Each bearer token is associated with a marketplace configuration in Engine. When launching the SDK, the bearer token, `channel`, `zone`, and `productTypes` must all belong to the same configuration.

An `EngineSDK` instance accepts one bearer token:

* For separate Personal Loans and Credit Cards experiences, launch a separate SDK instance with the token and configuration for the selected product.
* For a combined marketplace, use a single token configured for both products and include both values in `productTypes`.
* If you are not using prefill, omit `bearerToken`.

Your Engine representative will provide the appropriate values for each marketplace.

### Fields Available for Prepopulation

<table><thead><tr><th width="230">Class</th><th width="190">Field</th><th width="210">Type</th><th width="150">Applies to</th><th>Notes</th></tr></thead><tbody><tr><td><code>LeadPersonalInformation</code></td><td><code>firstName</code></td><td><code>String?</code></td><td>Both</td><td></td></tr><tr><td></td><td><code>lastName</code></td><td><code>String?</code></td><td>Both</td><td></td></tr><tr><td></td><td><code>email</code></td><td><code>String?</code></td><td>Both</td><td></td></tr><tr><td></td><td><code>dateOfBirth</code></td><td><code>DateTime?</code></td><td>Both</td><td></td></tr><tr><td></td><td><code>primaryPhone</code></td><td><code>String?</code></td><td>Both</td><td>10 digits, no "+" or "-" chars</td></tr><tr><td></td><td><code>address1</code></td><td><code>String?</code></td><td>Both</td><td></td></tr><tr><td></td><td><code>address2</code></td><td><code>String?</code></td><td>Both</td><td>Optional apartment / suite</td></tr><tr><td></td><td><code>city</code></td><td><code>String?</code></td><td>Both</td><td></td></tr><tr><td></td><td><code>state</code></td><td><code>State?</code></td><td>Both</td><td>Enum, 2-letter (e.g. <code>State.DC</code>)</td></tr><tr><td></td><td><code>zipcode</code></td><td><code>String?</code></td><td>Both</td><td></td></tr><tr><td></td><td><code>ssn</code></td><td><code>String?</code></td><td>Personal Loans only</td><td>9 digits, hyphens optional</td></tr><tr><td><code>LeadFinancialInformation</code></td><td><code>annualIncome</code></td><td><code>int?</code></td><td>Both</td><td>Raw integer value (e.g. 20000)</td></tr><tr><td></td><td><code>employmentStatus</code></td><td><code>EmploymentStatus?</code></td><td>Personal Loans only</td><td>Enum</td></tr><tr><td></td><td><code>employmentPayFrequency</code></td><td><code>EmploymentPayFrequency?</code></td><td>Personal Loans only</td><td>Enum</td></tr><tr><td></td><td><code>bankRoutingNumber</code></td><td><code>String?</code></td><td>Personal Loans only</td><td>Exactly 9 digits</td></tr><tr><td></td><td><code>bankAccountNumber</code></td><td><code>String?</code></td><td>Personal Loans only</td><td></td></tr><tr><td><code>LeadCreditInformationJson</code></td><td><code>providedCreditRating</code></td><td><code>ProvidedCreditRating?</code></td><td>Both</td><td>Enum</td></tr><tr><td><code>LeadLoanInformationJson</code></td><td><code>purpose</code></td><td><code>LoanPurpose?</code></td><td>Personal Loans only</td><td>Enum</td></tr><tr><td></td><td><code>loanAmount</code></td><td><code>int?</code></td><td>Personal Loans only</td><td>Whole numbers only</td></tr><tr><td><code>LeadMortgageInformationJson</code></td><td><code>propertyStatus</code></td><td><code>PropertyStatus?</code></td><td>Personal Loans only</td><td>Enum</td></tr><tr><td><code>LeadEmploymentInformationJson</code></td><td><code>directDeposit</code></td><td><code>bool?</code></td><td>Personal Loans only</td><td></td></tr><tr><td><code>LeadLegalInformationJson</code></td><td><code>consentsToSms</code></td><td><code>bool?</code></td><td>Personal Loans only</td><td>Lead agrees to receive SMS</td></tr><tr><td><code>LeadEducationInformationJson</code></td><td><code>educationLevel</code></td><td><code>EducationLevel?</code></td><td>Personal Loans only</td><td>Enum</td></tr><tr><td><code>LeadCreditCardInformationJson</code></td><td><code>cardPurposes</code></td><td><code>List&#x3C;CardPurpose>?</code></td><td>Credit Cards only</td><td>Enum</td></tr></tbody></table>

## Additional Information

For full setup steps, prefill examples, accepted enum values, client tags, and event handlers, see the product-specific guides:

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Personal Loans</strong></td><td>Full Flutter integration guide for the Personal Loans flow.</td><td><a href="/pages/tanyaisNBTPt6FYrFgxd">/pages/tanyaisNBTPt6FYrFgxd</a></td></tr><tr><td><strong>Credit Cards</strong></td><td>Full Flutter integration guide for the Credit Cards flow.</td><td><a href="/pages/WOvrSrMILLmgy4QtRiqX">/pages/WOvrSrMILLmgy4QtRiqX</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://even-financial.gitbook.io/developer-center/marketplace-integrations/mobile-sdks/unified-marketplace/flutter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
