palio

Provide your customers with an advanced Contact Center directly from your app. Engage with your customers through Video/VoIP Call or a simple text Chat...

Additionally you can provide your customers with VoIP and Video Call to increase their loyalty...

Announce and advertise new products, discounts, and other promotional contents by Live Streaming them directly to your customers...

Azka: Good afternoon, any recommendations for the best food in this place?

Deddy: Currently the best menu at our place is Rib Meatballs, currently there is a 20% discount promo just for today 😄

Azka: Wow interesting, may i order three servings? 😍


Notice: Undefined index: current_page in /var/www/html/palio.io/index.php on line 9

Why newuniverse.io?

dsdsdsds

Our Features

Help your customers satisfy their cravings. Users only need to type one word and the Bot will offer the available dishes that they crave.



<!-- If you are using Flutter, please modify the relevant tags in your styles.xml file as shown in the code below. -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="LaunchTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <item name="android:windowBackground">@drawable/launch_background</item>
    </style>
    <style name="NormalTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <item name="android:windowBackground">@android:color/white</item>
    </style>
</resources>








/**
For user satisfaction, all features provided in nexilis have been tested to meet certain performance, reliability, and availability standards. If you need to test these features (Audio Call, Video Call, Conference, Online Seminar, etc.), please download Nexilis from Google Play Store. Nexilis is a Social Media built entirely using newuniverse.io to demonstrate nexilis's performance, reliability, and availability standards.

=====================
NOTES
=====================
For user security and privacy reasons, newuniverse.io for Android will not work in the following environments:
1. Rooted Devices
2. Emulators
3. Android devices version below 6.0 (API 23). You need to set minSdkVersion 23 in your build.gradle (:app)
4. Especially for the minimum SDK version below 23 (Android OS Version 6.0) there needs to be additional code on the Androidmanifest.xml
<uses-sdk tools::overrideLibrary="
    io.nexilis.nexilisbutton,
    androidx.camera.view,
    androidx.camera.camera2,
    androidx.camera.lifecycle,
    androidx.camera.core "/>

=====================
Layout Customization
=====================
You can customize the look and layout of our live streaming, online seminar, and audio-video call features. To do so, follow these steps:
1. Download file activity layout (.xml) files dari link: res-pb.zip
2. Extract res-pb.zip into your project folder -> app -> src -> main.
3. Edit the gradle.properties configuration following the example below:
    android {
            ...
    
            sourceSets {
                main {
                        res.srcDirs = ['src/main/res', 'src/main/res-pb']
                }
        }

    }
3. Edit the activity layouts as you need.

Notice:
Please refrain from deleting view components or altering their id's as it may cause errors in the application.


=====================
proguard-rules.pro
=====================

Jika kamu melakukan build aplikasi menggunakan proguard, tambahkan baris-baris kode di bawah ini pada file proguard-rules.pro. 

#*******************************************************************************************************
-verbose
-optimizationpasses 14
-allowaccessmodification
-overloadaggressively
-flattenpackagehierarchy
-keeppackagenames doNotKeepAThing

-obfuscationdictionary dictionary.txt
-classobfuscationdictionary classdictionary.txt

# *******************************************************************************************************
-keep class * { native <methods>; }
-keep class androidx.core.app.** { public *; }
-keep class com.google.android.** { *; }
-keep class com.google.mlkit.** { *; }
-keep class net.zetetic.** { *; }
-keep interface com.google.android.** { *; }

-keep public class javax.mail.** { *; }
-keep public class com.sun.mail.** { *; }
-keep public class org.apache.harmony.** { *; }

# *******************************************************************************************************
-keep class net.sqlcipher.** { *; }
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** { **[] $VALUES; public *; }

# ************************************
-keep class com.google.android.gms.** { *; }
-keep class com.google.firebase.** { *; }
                                                                                                                    
/**
Untuk menjaga kepuasan pelanggan, seluruh fitur yang disediakan nexilis telah diuji untuk memenuhi kriteria performa, kehandalan dan ketersediaan. Jika kamu ingin menguji fitur-fitur dimaksud (Audio Call, Video Call, Conference, Online Seminar, dll.) kamu bisa mengunduh catchUp dari Google Play Store. catchUp adalah Media Sosial yang dibangun sepenuhnya menggunakan newuniverse.io untuk menunjukkan fitur dan standar performa dan kehandalan dari newuniverse.io

=====================
NOTES
=====================
Untuk alasan Keamanan dan Privasi pengguna, newuniverse.io untuk Android tidak akan dapat berjalan pada kondisi berikut:
    1. Rooted Devices
    2. Emulators
    3. Perangkat Android dengan version dibawah 6.0 (API 23). Pastikan kamu sudah menentukan minSdkVersion 23 didalam build.gradle (:app)
    4. Aplikasi yang melakukan backup & restore data pada infrastruktur backup. Pastikan kamu sudah menentukan 3 variabel berikut didalam Manifest file mu
    android:allowBackup="false"
    android:fullBackupOnly="false"
    android:fullBackupContent="false"


=====================
Layout Customization
=====================
Kamu dapat mengubah tampilan dan layout dari fitur live streaming, online seminar, dan audio-video call. Ikuti Langkah-langkah berikut untuk melakukan perubahan tersebut:
1. Download file activity layout (.xml) dari link: res-pb.zip
2. Extract res-pb.zip kedalam folder project mu -> app -> src -> main.
3. Ubah konfigurasi file gradle.properties sesuai contoh dibawah ini.
	android {
    		...
    
    		sourceSets {
        		main {
            			res.srcDirs = ['src/main/res', 'src/main/res-pb']
        		}
		}

	}
4. Ubah activity layout sesuai kebutuhanmu.

Catatan:
Hindari menghapus view components atau mengubah id komponen karena akan mengakibatkan error pada application.
  

=====================
proguard-rules.pro
=====================

Jika kamu melakukan build aplikasi menggunakan proguard, tambahkan baris-baris kode di bawah ini pada file proguard-rules.pro. 

#*******************************************************************************************************
-verbose
-optimizationpasses 14
-allowaccessmodification
-overloadaggressively
-flattenpackagehierarchy
-keeppackagenames doNotKeepAThing

-obfuscationdictionary dictionary.txt
-classobfuscationdictionary classdictionary.txt

# *******************************************************************************************************
-keep class * { native ; }
-keep class androidx.core.app.** { public *; }
-keep class com.google.android.** { *; }
-keep class com.google.mlkit.** { *; }
-keep class net.zetetic.** { *; }
-keep interface com.google.android.** { *; }

-keep public class javax.mail.** { *; }
-keep public class com.sun.mail.** { *; }
-keep public class org.apache.harmony.** { *; }

# *******************************************************************************************************
-keep class net.sqlcipher.** { *; }
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** { **[] $VALUES; public *; }
                                                                                                                    
package com.example.PalioLiteSampleCode;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;
 
import io.nexilis.service.Callback;
import io.nexilis.service.API;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_main);

        /*************************************
         Connect to our server with your newuniverse.io Account, and implement the required Callback.
         Please Subscribe or contact us to get your newuniverse.io Account.
         Do not share your newuniverse.io Account or ever give it out to someone outside your organization.
         ************************************/
        /**
         * API.connect (String NexilisAccount, Activity RegisteredActivity, int NexilisButtonMode, boolean UserMayModifyUID, Callback ConnectCallback)
         *
         * NexilisAccount 		: Your Nexilis.io Account.
         * RegisteredActivity       	: Android's Activity class that is used to register the Nexilis Button
         * NexilisButtonMode 	        : The flag that determines when the Nexilis Button should appear.
         *              0 = Disabled Nexilis Button
         * 		1 = Within registered Activity, (Nexilis Button only appears when users are in the registered activity)
         * 		2 = Within App (Nexilis Button always appears as long as user is in the App),
         * 		3 = Always On (Nexilis Button always appears even if the application process is closed)
         * UserMayModifyUID 	: Sets whether users are allowed to change the Nexilis UserID.
         * 		true = enabled,
         * 		false = disabled
         * ConnectCallback	: The callback interface to be invoked when calling the method connect.
         * 		You need to implement onSuccess(String NexilisUserID) & onFailed(String reasonCode) to handle the RESULT.
         *
         */
        API.connect("***REPLACE***WITH***YOUR***NEXILIS***ACCOUNT***", this, 0, new Callback() {
            @Override
            public void onSuccess(final String NexilisUserID) {
                // Handle onSuccess event here.
                // This callback will be triggered automatically when the Nexilis service is
                // successfully started, and the Client connected to the Server.
            }

            @Override
            public void onFailed(final String reasonCode) {
                // Handle onFailed event here.
                // This callback will be triggered automatically when there is an issue during
                // the execution of API.connect method.
            }
        });

        /**
         *
         * An OPTIONAL Method to change your Nexilis User ID
         * You can call this method anytime after API.connect calls onSuccess
         *
         * String ResponCode = Nexilis.changeUsername(String NewUserID)
         *
         * ResponCode 	: Returns a code based on the status of the function call.
         * 		00:Success
         *		23:Unsupported Android version
         * 		94:Unregistered User
         * 		96:Activity is null
         * 		97:Account is empty
         * 		101:Unable to access server. Check your connection and try again later
         * 		102:Duplicate username
         * 		103:Username is empty
         * 		104:Username length is too short
         * 		105:Username length is too long
         * 		106:Illegal State. Be sure call API.connect and #callback state onSuccess called
         * NewUserID	: Desired User ID
         */
    }
    
}
dependencyResolutionManagement {
      repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
      repositories {
          gradlePluginPortal()
          google()
          mavenCentral()
          jcenter()
          maven {
              url "https://newuniverse.io/artifactory/nexilis-libs/"
              credentials {
                  username = "**REPLACE*WITH*YOUR*MAVEN*USERNAME**"
                  password = "**REPLACE*WITH*YOUR*MAVEN*PASSWORD**"
              }
          }

          maven { url 'https://maven.google.com' }
          maven { url 'https://jitpack.io' }
      }
  }
  buildscript {
      dependencies {
          classpath 'com.android.tools.build:gradle:7.3.1'
      }
  }

  plugins {
      id 'com.android.application' version '7.2.2' apply false
      id 'com.android.library' version '7.2.2' apply false
      id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
      id 'com.google.gms.google-services' version '4.3.14' apply false
  }

  task clean(type: Delete) {
      delete rootProject.buildDir
  }
android.useAndroidX=true
android.enableJetifier=true
tools:replace="android:fullBackupContent"

// If you are building your app with proguard, add these lines in your proguard-rules.pro file.
-dontwarn io.newuniverse.SDK.**
-keep class io.newuniverse.SDK.** { *;}
-keep interface io.newuniverse.SDK.** { *; }
-keep class * implements io.newuniverse.SDK.** { *;}

-keep class net.sqlcipher.** { *; }                              
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                                                                                                                    
// Please make sure you have set minSdkVersion to 23.
android {
    compileSdkVersion 33
    buildToolsVersion "32.0.0"
    defaultConfig {
        applicationId "com.example.***myapplication***"
        minSdkVersion 23 // Android SDK version 23 or later is required
        multiDexEnabled true
        targetSdkVersion 33
        versionCode 3
        versionName "3.0"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    lintOptions {
        abortOnError false
    }

    packagingOptions {
        doNotStrip "*/armeabi-v7a/*.so"
        doNotStrip "*/arm64-v8a/*.so"

        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }
}

dependencies {
    // *** Add nexilis Lite dependencies ***
    implementation("***REPLACE***WITH***YOUR***NEXILIS***VERSION***LIBRARY***") {
        exclude group: 'org.apache.httpcomponents'
        transitive = true
    }
}



IOS

<!-- If you are using Flutter, please modify the relevant tags in your styles.xml file as shown in the code below. -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="LaunchTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <item name="android:windowBackground">@drawable/launch_background</item>
    </style>
    <style name="NormalTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
        <item name="android:windowBackground">@android:color/white</item>
    </style>
</resources>








IOS

/**

For user satisfaction, all features provided in nexilis have been tested to meet certain performance, reliability, and availability standards. If you need to test these features (Audio Call, Video Call, Conference, Online Seminar, etc.), please download Nexilis from Google Play Store. Nexilis is a Social Media built entirely using newuniverse.io to demonstrate nexilis's performance, reliability, and availability standards.

=====================
NOTES
=====================
For user security and privacy reasons, newuniverse.io for Android will not work in the following environments:
1. Rooted Devices
2. Emulators
3. Android devices version below 6.0 (API 23). You need to set minSdkVersion 23 in your build.gradle (:app)
4. Applications that uses the backup and restore infrastructure. Please make sure you have the following 3 lines of code in your Manifest file:
android:allowBackup="false"
android:fullBackupOnly="false"
android:fullBackupContent="false"


=====================
Layout Customization
=====================
You can customize the look and layout of our live streaming, online seminar, and audio-video call features. To do so, follow these steps:
1. Download the activity layout (.xml) files by clicking this link: activity_layouts.zip
2. Extract the .xml files into your project folder -> app -> src -> main -> res -> layout folder.
3. Edit the activity layouts as you need.

Notice:
Please refrain from deleting view components or altering their id's as it may cause errors in the application.

=====================
proguard-rules.pro
=====================
If you are building your app with proguard, add the lines below in your proguard-rules.pro file.
-dontwarn io.newuniverse.SDK.**
-keep class io.newuniverse.SDK.** { *;}
-keep interface io.newuniverse.SDK.** { *; }
-keep class * implements io.newuniverse.SDK.** { *;}

-keep class net.sqlcipher.** { *; } 

*/
 





                                                                                                                    
iOS

/**
Untuk menjaga kepuasan pelanggan, seluruh fitur yang disediakan nexilis telah diuji untuk memenuhi kriteria performa, kehandalan dan ketersediaan. Jika kamu ingin menguji fitur-fitur dimaksud (Audio Call, Video Call, Conference, Online Seminar, dll.) kamu bisa mengunduh catchUp dari Google Play Store. catchUp adalah Media Sosial yang dibangun sepenuhnya menggunakan Palio.io untuk menunjukkan fitur dan standar performa dan kehandalan dari Palio.io

=====================
NOTES
=====================
Untuk alasan Keamanan dan Privasi pengguna, newuniverse.io untuk Android tidak akan dapat berjalan pada kondisi berikut:
    1. Rooted Devices
    2. Emulators
    3. Perangkat Android dengan version dibawah 6.0 (API 19). Pastikan kamu sudah menentukan minSdkVersion 19 didalam build.gradle (:app)
    4. Aplikasi yang melakukan backup & restore data pada infrastruktur backup. Pastikan kamu sudah menentukan 3 variabel berikut didalam Manifest file mu
    android:allowBackup="false"
    android:fullBackupOnly="false"
    android:fullBackupContent="false"

=====================
Layout Customization
=====================
Kamu dapat mengubah tampilan dan layout live streaming, online seminar, dan audio-video call features.Ikuti Langkah-langkah berikut untuk melakukan perubahan tsb:
1. Download file activity layout (.xml) files dari link: activity_layouts.zip
2. Extract file .xml kedalam folder project mu -> app -> src -> main -> res -> layout folder.
3. Ubah activity layouts sesuai kebutuhanmu.

Catatan:
Hindari menghapus view components atau mengubah id komponen karena akan mengakibatkan error pada application.
  

=====================
proguard-rules.pro
=====================
Jika kamu melakukan build aplikasi menggunakan proguard, tambahkan baris-baris kode di bawah ini pada file proguard-rules.pro.
-dontwarn io.newuniverse.SDK.**
-keep class io.newuniverse.SDK.** { *;}
-keep interface io.newuniverse.SDK.** { *; }
-keep class * implements io.newuniverse.SDK.** { *;}

-keep class net.sqlcipher.** { *; } 
*/

 





                                                                                                                    

name: sample_application_nexilis_lite
description: A new Flutter application.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.0
  nexilis_lite: ^0.0.1-dev.1

dev_dependencies:
  flutter_test:
    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  # assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages



IOS

/***********************************************************************************************************
If you are using Flutter for your app, please follow the sample code below.

If you are using Native Android, please refer to Option-1.
************************************************************************************************************/
package com.example.FloatingButtonSampleCode;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;

import io.nexilis.nexilisbutton.Callback;
import io.nexilis.nexilisbutton.Nexilis;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_main);
 
        /*************************************
         Connect to our server with your newuniverse.io Account, and implement the required Callback.
         Please Subscribe or contact us to get your newuniverse.io Account.
         Do not share your newuniverse.io Account or ever give it out to someone outside your organization.
         ************************************/
        /** 
        * API.connect (String NexilisAccount, Activity RegisteredActivity, int NexilisButtonMode, boolean UserMayModifyUID, Callback ConnectCallback) 
        * 
        * NexilisAccount 		: Your Nexilis.io Account. 
        * RegisteredActivity 	: Android's Activity class that is used to register the Nexilis Button 
        * NexilisButtonMode 	: The flag that determines when the Nexilis Button should appear. 
        * 		1 = Within registered Activity, (Nexilis Button only appears when users are in the registered activity) 
        * 		2 = Within App (Nexilis Button always appears as long as user is in the App), 
        * 		3 = Always On (Nexilis Button always appears even if the application process is closed) 
        * UserMayModifyUID 	: Sets whether users are allowed to change the Nexilis UserID. 
        * 		true = enabled, 
        * 		false = disabled 
        * ConnectCallback	: The callback interface to be invoked when calling the method connect. 
        * 		You need to implement onSuccess(String NexilisUserID) & onFailed(String reasonCode) to handle the RESULT. 
        * 
        */
        API.connect("***REPLACE***WITH***YOUR***NEXILIS***ACCOUNT***", this,1, new Callback() {

            @Override
            public void onSuccess(final String NexilisUserID) {
                /**************************************
                 The NexilisUserId is generated automatically and can be mapped to a User ID on the application level.
                 Forand can be mapped into the corresponding Application User ID (e.g. John Doe),
                 so you don't have to share your Application User ID with Palio.io while still being able to monitor your user activities.
                 **************************************/
                /* do something */
                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        Toast.makeText(getBaseContext(), "Your Palio User ID: " + PalioUserID, Toast.LENGTH_LONG).show();
                    }
                });
            }
 
            @Override
            public void onFailed(final String reasonCode) {
                /**
                 * reasonCode 	: Returns a code based on the status of the function connect called.
                 * 		2:Your trial subscription has expired. Please subscribe to continue using Palio.io.
                 * 		3:Your monthly subscription is not paid in full. Please pay your monthly subscription bill to continue using Palio.io service.
                 * 		4:Your Customer Engagement Credit has run out and your Prepaid Credit Balance is empty. Please top-up your Prepaid Credit Balance to continue using Palio.io
                 *              23:Unsupported Android version
                 * 		93:Missing the required overlay permission
                 * 		95:Invalid Palio Button Mode (1,2,3)
                 * 		96:Activity is null
                 * 		97:Account is empty
                 * 		98:Your account didn't match
                 * 		99:Something went wrong
                 */
                /* do something */
                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        Toast.makeText(getBaseContext(), reasonCode, Toast.LENGTH_LONG).show();
                    }
                });
            }
        });
 

        /**
         * 
         * An OPTIONAL Method to change your Palio User ID
         * You can call this method anytime after Palio.connect calls onSuccess
         * 
         * String ResponCode = Palio.changeUsername(String NewUserID)
         * 
         * ResponCode 	: Returns a code based on the status of the function call.
         * 		00:Success
         *              23:Unsupported Android version
         * 		96:Activity is null
         * 		97:Account is empty
         * 		101:Unable to access server. Check your connection and try again later
         * 		102:Duplicate username
         * 		103:Username is empty
         * 		104:Username length is too short
         * 		105:Username length is too long
         * 		106:Illegal State. Be sure to call Palio.connect and #callback state onSuccess called
         * NewUserID	: Desired User ID
         */
        String ResponCode = Palio.changeUsername("***REPLACE***WITH***NEW***USERID***");
    }
}




// If you are building your app with proguard, add these lines in your proguard-rules.pro file.
-dontwarn io.newuniverse.SDK.**
-keep class io.newuniverse.SDK.** { *;}
-keep interface io.newuniverse.SDK.** { *; }
-keep class * implements io.newuniverse.SDK.** { *;}

-keep class net.sqlcipher.** { *; }                              
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                                                                                                                    

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

import 'package:flutter/services.dart';
import 'package:nexilis_lite/nexilis_button.dart';
import 'package:nexilis_lite/nexilis_lite.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State {
  String _platformVersion = 'Unknown';

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

  // Platform messages are asynchronous, so we initialize in an async method.
  Future initPlatformState() async {
    String platformVersion;
    // Platform messages may fail, so we use a try/catch PlatformException.
    // We also handle the message potentially returning null.
    try {
      platformVersion =
          await NexilisLite.platformVersion ?? 'Unknown platform version';
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _platformVersion = platformVersion;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Stack(
          children: [
            NexilisButton(
                xpos: 0,
                ypos: 0,
                apiKey:
                    '***REPLACE***WITH***YOUR***NEXILIS***ACCOUNT***'),
          ],
        ),
      ),
    );
  }
}