# Flutter

## Installation

Add Cotter to your `pubspec.yaml` , then run `flutter pub get`.

```yaml
dependencies:
  cotter:
```

Check the latest releases in [pub.dev](https://pub.dev/packages/cotter#-installing-tab-). You may need to restart your flutter for it to run pod install (stop flutter run and re run it).

#### For Android:

Update the `minSdkVersion` inside `android/app/build.gradle` to 18:

```yaml
defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.example"
    minSdkVersion 18   // 👈 Update this line
    targetSdkVersion 28
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}
```

## **Complete Guides**

#### **Sign in with Device**

Allow users to login automatically from a device that they trust.

{% content-ref url="/pages/-M9angupK73fWUZjM7fe" %}
[Sign In with Device](/sdk-reference/flutter/sign-in-with-device.md)
{% endcontent-ref %}

#### Sign in with Email/Phone Number

Authenticate users by sending a Magic Link or OTP via email, SMS, or WhatsApp.

{% content-ref url="/pages/-MATH96wMixRR82bWQJJ" %}
[Sign in with Email/Phone Number](/sdk-reference/flutter/sign-in-with-email-phone-number.md)
{% endcontent-ref %}

## Quickstart Guides

{% content-ref url="/pages/-M9aaGUmTZYju\_sjd17x" %}
[Flutter – Sign in with Device](/quickstart-guides/flutter-sign-in-with-device.md)
{% endcontent-ref %}


---

# Agent Instructions: 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:

```
GET https://docs.cotter.app/sdk-reference/flutter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
