---
title: "Test sign-up emails in a Flutter app · Proxy Mail QA"
description: "Test codes, magic links and deep links in a Flutter app on iOS and Android: by hand, in integration tests with a Dart helper, and with Supabase or Firebase."
url: https://proxymail.qa/mobile/flutter
---

1. [Home](https://proxymail.qa/)
2. [Mobile apps](https://proxymail.qa/mobile)

# Testing sign-up emails in a Flutter app

One Flutter codebase, two platforms, two ways for a link to open the app. Test the code and the link on both: by hand in the simulator and emulator, or in an integration test that reads the email itself.

Updated October 18, 2026

## Why sign-up emails are awkward to test in Flutter

- **Two platforms, two link systems.** A verify link opens the app through Universal Links on iOS and App Links on Android, and each has its own setup that can be wrong on its own.
- **Tests can’t read email.** There’s no inbox in the simulator or emulator worth using, and widget tests block the network anyway.
- **Two things may be listening for links.** Flutter’s own deep linking and a plugin such as `app_links` can both claim the same link.
- **Single-use links break if anything opens them first.** Proxy Mail QA never opens or prefetches a link.

## Test it by hand

1. **Create an address** in Proxy Mail QA, with a persona and a generated password if your form needs them.
2. **Sign up in the app** on the iOS simulator or Android emulator. Both share your computer’s clipboard.
3. **Get the code** from the address’s row with **Copy**.
4. **Or open the link in the app:** `xcrun simctl openurl booted '<link>'` on iOS, or `adb shell "am start -W -a android.intent.action.VIEW -d '<link>'"` on Android. For a `myapp://` link the inbox shows both commands next to it.

## Automate it with integration\_test

Add the Dart helper from the [Flutter guide](https://proxymail.qa/docs/flutter) to `integration_test/`. It only uses `dart:io` and `dart:convert`, so the one dev dependency is Flutter’s own `integration_test`:

Dart

```dart
final qa = ProxyMailQA();
final account = await qa.createAddress();
app.main();
await tester.pumpAndSettle();

final submitted = DateTime.now();
await tester.enterText(find.byKey(const Key('email')), account.address);
await tester.enterText(find.byKey(const Key('password')), account.password!);
await tester.tap(find.text('Sign up'));
await tester.pumpAndSettle();

final code = await qa.waitForCode(account.address, submitted);
await tester.enterText(find.byKey(const Key('code')), code);

```

Run it with `flutter test integration_test --dart-define=PROXYMAIL_QA_API_KEY=$PROXYMAIL_QA_API_KEY`. For links, `qa.waitForLink(account.address, submitted)` returns the link; add `app: true` for the `myapp://` one when the email has both.

The same helper checks the email itself (`checkEmail` with your app’s link domain, and `countEmails` for duplicates), signs in as a saved test account, and adds each test to the pull request’s report: see the [Flutter guide](https://proxymail.qa/docs/flutter#check-the-email-not-just-the-code).

## What to check in your Flutter code

- **The email field leaves the address alone.** `keyboardType: TextInputType.emailAddress`, `autocorrect: false` and `autofillHints: [AutofillHints.email]`.
- **The code field offers AutoFill.** `autofillHints: [AutofillHints.oneTimeCode]`.
- **Only one thing handles links.** Use Flutter’s built-in deep linking with go\_router, or a plugin such as `app_links`, not both. If you use a plugin, turn Flutter’s off: `FlutterDeepLinkingEnabled` set to `NO` in `Info.plist`, and `flutter_deeplinking_enabled` set to `false` in `AndroidManifest.xml`.
- **Cold-start links work on both platforms.** Close the app, open the link, and check it lands on the right screen on iOS and on Android.
- **Supabase redirects open the app.** Pass `emailRedirectTo: 'com.example.myapp://login-callback/'` (your own scheme), add it to Redirect URLs in Supabase, and register the scheme on both platforms.
- **Links don’t point at your computer.** The Android emulator reaches your computer at `10.0.2.2`, not `localhost`. See [links that point at localhost](https://proxymail.qa/solve/localhost-links).

Using Firebase email-link sign-in with `firebase_auth`? It needs Associated Domains and App Links for your Hosting domain: see [Firebase email-link sign-in on mobile](https://proxymail.qa/mobile/firebase-email-link).

## Try it on your next sign-up test

Free plan, no credit card. Create an address and watch the code or link arrive.

[Create a free account](https://app.proxymail.qa/?mode=signup)

## Questions

### Why does my test get a 400 when it calls the API?

Plain widget tests (flutter test test/) block real network requests and answer every one with a 400\. Run the sign-up test as an integration test, from the integration\_test folder, on a simulator, emulator or device, where requests go out normally.

### Can a Flutter test open the link from the email?

A widget or integration test can't open a link the way the phone would. Open it from your computer (xcrun simctl openurl booted or adb shell am start), use Maestro's openLink, or use Patrol, which can drive the phone from a Flutter test.

### My Supabase magic link opens the app but nothing happens. Why?

supabase\_flutter handles the link when the app opens, as long as the scheme in emailRedirectTo is set up as a deep link on both platforms and listed under Redirect URLs in Supabase. If another plugin also handles links, make sure it doesn't swallow the link first.

### Where does the API key go?

Pass it to the test run with --dart-define=PROXYMAIL\_QA\_API\_KEY=… from your shell or CI secrets. Never add it to the app's own configuration.

## Related guides

- [Test sign-up emails in a SwiftUI or UIKit appCodes and Universal Links in the iOS simulator, by hand or in XCUITest, and the cold-start link bug to check for.](https://proxymail.qa/mobile/ios-sign-up-testing)
- [Test sign-up emails in an Android app (Kotlin)Codes and App Links on the emulator, by hand or in Espresso, and why a link opens Chrome instead of your app.](https://proxymail.qa/mobile/android-sign-up-testing)
- [Test sign-up emails and magic links in React Native and Expoexp:// and myapp:// links from Expo Go and development builds, opened in the simulator or from Detox.](https://proxymail.qa/mobile/react-native-expo)
- [Test Firebase email-link sign-in on iOS and AndroidThe setup after Dynamic Links shut down, and how to test the link opening the app on the same and another device.](https://proxymail.qa/mobile/firebase-email-link)

[See every email testing problem we solve](https://proxymail.qa/solve)
