palio















// Please make sure you have set minSdkVersion to 23.

// Add the following lines to include the Palio.io repository into your app
repositories {
    maven {
        url "https://palio.io/artifactory/libs-release-local"
        credentials {
            username = "***REPLACE***WITH***YOUR***MAVEN***USERNAME***"
            password = "***REPLACE***WITH***YOUR***MAVEN***PASSWORD***"
        }
    }
}

dependencies {
    // *** Please make sure you have the Material library in your dependencies ***
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.google.android.gms:play-services-vision:20.1.3'

    // *** Add Palio Lite dependencies ***
    implementation 'io.palio:palio-lite:1.0.69'
    implementation('com.google.apis:google-api-services-gmail:v1-rev98-1.25.0') {
        exclude group: 'org.apache.httpcomponents'
        transitive = true
    }
    implementation('com.github.bumptech.glide:glide:4.12.0@aar') {
        transitive = true
    }
    implementation ('net.zetetic:android-database-sqlcipher:4.4.2@aar') {
        transitive = true
    }
}

                                                                                                                    



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

import 'package:flutter/services.dart';
import 'package:palio_lite/palio_button.dart';
import 'package:palio_lite/palio_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 PalioLite.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: [
            PalioButton(
                xpos: 0,
                ypos: 0,
                apiKey:
                    '***REPLACE***WITH***YOUR***PALIO***ACCOUNT***'),
          ],
        ),
      ),
    );
  }
}