indigitall_flutter_plugin 2.19.3
indigitall_flutter_plugin: ^2.19.3 copied to clipboard
With the indigitall tool, you will be able to capture and communicate with the visitors of your website, the users of your app or your clients in general.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:indigitall_flutter_plugin/core/utils/IndigitallParams.dart';
import 'package:indigitall_flutter_plugin/indigitall_flutter_plugin.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String? _deviceId = 'Unknown';
@override
void initState() {
super.initState();
Map params = {
IndigitallParams.PARAM_APP_KEY : "YOUR_APP_KEY",
IndigitallParams.PARAM_SENDER_ID : "YOUR_SENDER_ID",
IndigitallParams.PARAM_REQUEST_LOCATION : true,
IndigitallParams.PARAM_WIFI_FILTER_ENABLED : true,
IndigitallParams.PARAM_URL_DEVICE_API : "https://device-api.indigitall.com/v1",
IndigitallParams.PARAM_LOG_DEBUG : false
};
IndigitallFlutterPlugin.init(params, (device) => {
print("init device "+ device.deviceId.toString()),
_deviceId = device.deviceId,
}, (device) => {
print("init onnew device "+ device.deviceId.toString()),
_deviceId = device.deviceId,
}, (error) => {
print("error init device "+ error.errorMessage.toString())
});
Container _containerExample = Container(width: 550, height: 95);
IndigitallFlutterPlugin.showInAppWithConfig({
IndigitallParams.PARAM_INAPP_CODE: "YOUR_INAPP_CODE",
},
_containerExample,
(inApp, action) {
print("InApp clicked action: ${action.url}");
print("InApp clicked: ${inApp.toMap()}");
},(container, error) {
print("error didexpired: ${error.errorMessage}");
},(inApp, error) {
print("error didShowManyTimes: ${error.errorMessage}");
},(inApp, error) {
print("error didClickOut: ${error.errorMessage}");
},(inApp, error) {
print("error dismissForever: ${error.errorMessage}");
},(inApp, error) {
print("error didFormSubmit: ${error.errorMessage}");
},(inApp, container) {
setState(() {
_containerExample = container;
print("InApp schema 2 loaded: ${inApp.inAppId}");
});
},
(error) {
print("InApp schema 2 error: ${error.errorMessage ?? "error general"}");
}
);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Device Id: $_deviceId\n'),
),
),
);
}
}