onairos 0.2.28 copy "onairos: ^0.2.28" to clipboard
onairos: ^0.2.28 copied to clipboard


Onairos is a flutter package to interact with the Onairos App and recieve user AI Data

Onairos Package v0.1.0 #

A Flutter package for opening a custom overlay using deep links and passing data between applications.

Features #

  • Open a custom overlay with a deep link.
  • Pass request data and a return link to the overlay.
  • Customizable button with the Onairos logo.

Getting Started #

To use the Onairos package, include it in your pubspec.yaml file:

  onairos: ^0.1.0

iOS Integration #

To handle onairos biometric key store access (necessary) and other functionality on iOS with the Onairos package, you need to add the following configuration to your Info.plist file:

1st configurations

<string>Authenticate to access secure storage</string>
<string>This app requires access to your biometric information for authentication purposes.</string>


Secure Enclave Access:

In your app's target settings, under the "Signing & Capabilities" tab, add the "Secure Enclave" capability.

Then add the following Deep Link Permissions

iOS Configuration #

  1. Update Info.plist:

    • To handle deep links, you must declare your URL schemes in your Info.plist under CFBundleURLTypes. Here's how you can add a custom URL scheme:
    • This configuration allows iOS to direct URLs with your-custom-scheme to your app.
  2. Handle Incoming URLs:

    • Implement the application(_:open:options:) method in your AppDelegate:
      func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
          return true

Android Configuration #

  1. Update AndroidManifest.xml:

    • Declare your URL schemes within an <intent-filter> in your AndroidManifest.xml:
      <activity android:name=".MainActivity">
              <action android:name="android.intent.action.VIEW" />
              <category android:name="android.intent.category.DEFAULT" />
              <category android:name="android.intent.category.BROWSABLE" />
              <data android:scheme="your-custom-scheme" />
    • This configuration directs URLs with your-custom-scheme to your app.
  2. Handle Intent in Activity:

    • Manage the Intent in your onCreate or onNewIntent method:
      protected void onNewIntent(Intent intent) {
          // Process the intent to extract data

Testing Your Setup #

  • iOS: Use Xcode or Safari to test your URL scheme by typing it into the address bar.
  • Android: Use ADB to test your URL scheme:
    adb shell am start -W -a android.intent.action.VIEW -d "your-custom-scheme://test" com.example.yourapp

Additionally make sure to have the following AppDelegate.swift file included in your project

import UIKit
import Flutter

@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)

Usage #

Now we move on to adding the Onairos integration #


  • requestData (Object): Request data to display to user, what user data you want access to
  • returnLink (String): The registered CFBundleURL of your app, so the onairos app can redirect back on first authorization
  • logoAssetPath (String): String path of the logo you want to display when requesting access

Here is a simple example of using the OnairosButton widget in your app:

import 'package:flutter/material.dart';
import 'package:onairos/onairos.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          // Use the OnairosButton widget
          child: OnairosButton(
            requestData: {
              'type': 'Personality',
              'descriptions': 'Find out Your Anime Interests',
              'reward': "\$0.30 - Test Money",
            returnLink: 'yourapp://returnlink',
            logoAssetPath: 'onairos_logo.png',

Replace 'yourapp://returnlink' with the actual return link for your application, and ensure the logoAssetPath points to a valid asset in your project.

Customization #

The OnairosButton widget allows for customization of the request data and return link. Make sure to provide a valid asset path to display the Onairos logo on the button.

Contributing Feel free to contribute to the Onairos package. If you have suggestions or find bugs, please open an issue or create a pull request.

pub points


unverified uploader

Onairos is a flutter package to interact with the Onairos App and recieve user AI Data

Repository (GitHub)
View/report issues


API reference


Apache-2.0 (LICENSE)


app_links, biometric_storage, dart_jsonwebtoken, flutter, flutter_secure_storage, http, local_auth, url_launcher


Packages that depend on onairos