sense_flutter_plugin 0.0.7
sense_flutter_plugin: ^0.0.7 copied to clipboard
Sense is a device intelligence and identification tool. This tool collects a comprehensive set of attributes unique to a device or browser, forming an identity that will help businesses.
Sense - Flutter SDK #
Sense is a device intelligence and identification tool. This tool collects a comprehensive set of attributes unique to a device or browser, forming an identity that will help businesses.
Step 1 - Add Dependency in pubspec.yaml
sense_flutter_plugin : 0.0.7
Step 2 - Import Package
import 'package:sense_flutter_plugin/sense_flutter_plugin.dart';
Step 3 - Initialize SDK
Add the following line of code to initialize it with the api key you obtained from the Sense Client panel. If you don't have a api key create new one.
Sense.initSDK("YOUR_PUBLIC_KEY",false, false, "YOUR_TAG");
Step 4 - Get Device Details
Use the below code to get the Device Details
Sense.getSenseDetails()
Sample Program
Here you can find the demonstration to do the integration.
import 'package:sense_flutter_plugin/sense_flutter_plugin.dart';
class _SenseAppState extends State<SenseApp> {
late Sense sense;
@override
void initState() {
super.initState();
_initSDK();
}
void _initSDK() {
sense = Sense.initSDK("YOUR_PUBLIC_KEY",false,false,"YOUR_TAG");
}
void getSenseDetails() async {
try {
const deviceDetails = await sense.getSenseDetails();
print(`Sense Details: ${deviceDetails}`);
} on PlatformException catch (e) {
}
}
}