indigitall_flutter_plugin 2.12.0 indigitall_flutter_plugin: ^2.12.0 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.
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_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())
});
}
@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'),
),
),
);
}
}