# Flutter SDK

This project is a starting point for a Flutter [plug-in package](https://flutter.dev/developing-packages/), a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter development, view the [online documentation](https://flutter.dev/docs), which offers tutorials, samples, guidance on mobile development, and a full API reference.

```dart
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:purplepro/purplepro.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';
  final _purpleproPlugin = Purplepro();

  @override
  void initState() {
    super.initState();
    initPurpleProPlugin();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPurpleProPlugin() async {
    _purpleproPlugin.setPartnerIdAndUserId(partnerId: "77010207011", userId: "5842918d-7d0f-4091-ab8b-4a6abfb5bf22");
  }

  Future<void> startPurplepro() async {
    _purpleproPlugin.startBluePine(darkMode: false);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: <Widget>[
              ElevatedButton(
                onPressed: () {
                  startPurplepro();
                },
                child: const Text('Enabled'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
```

**Installation Steps:**

### Use this package as a library

#### Depend on it

Run this command:

With Flutter:

```shell
 $ flutter pub add purplepro
```

This will add a line like this to your package's pubspec.yaml (and run an implicit `flutter pub get`):

```dart
dependencies:
purplepro: ^0.0.1
```

Alternatively, your editor might support `flutter pub get`. Check the docs for your editor to learn more.

#### Import it

Now in your Dart code, you can use:

```dart
import 'package:purplepro/purplepro.dart';
```

[API reference](https://pub.dev/documentation/purplepro/latest/)

[flutter](https://api.flutter.dev/), [plugin\_platform\_interface](https://pub.dev/packages/plugin_platform_interface)

[<mark style="color:blue;">Packages that depend on c</mark>](https://pub.dev/packages?q=dependency%3Apurplepro)<mark style="color:blue;">onscent.ai</mark>


---

# 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.conscent.ai/loyalty-system/flutter-sdk.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.
