flutter_shieldfraud 1.0.5 copy "flutter_shieldfraud: ^1.0.5" to clipboard
flutter_shieldfraud: ^1.0.5 copied to clipboard

Flutter plugin for Shield SDK. SHIELD SDK helps developers to assess malicious activities performed on mobile devices and return risk intelligence based on user's behaviour.

example/lib/main.dart

import 'dart:collection';
import 'package:flutter/material.dart';
import 'package:flutter_shieldfraud/plugin_shieldfraud.dart';
import 'package:flutter_shieldfraud/shield_config.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();


    initShield();

    // Shield.latestDeviceResult.then((latestDeviceResult) => {
    //       if (latestDeviceResult == null)
    //         {print("error ${Shield.latestError?.message}")}
    //       else
    //         {print("result $latestDeviceResult")}
    //     });
  }
 void initShield() async {
   ShieldCallback shieldCallback =
   ShieldCallback((Map<String, dynamic> result) {
     print("callback result: $result");
   }, (ShieldError error) {
     print("callback error: ${error.message}");
   });

   ShieldConfig config = ShieldConfig(
       siteID: "05500c2a429e0c873f3b8d42e1bee1f75f44ac8c",
       key: "a719e2620000000005500c2a429e0c873f3b8d42e1bee1f75f44ac8c",
       shieldCallback: shieldCallback,
       enableShieldProcess: true,
       logLevel: ShieldLogLevel.verbose);

   Shield.initShield(config);

   Shield.isShieldInitialized.then((value) => {
     print("Shield is initialized second call: $value"),
     if (value)
       {
         Shield.sessionId
             .then((value) => print("actual sessionID: $value"))

       }
   });
 }
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
            child: MaterialButton(
          onPressed: () {
            Shield.sendDeviceSignature("test sending device signature").then(
                (value) => print(
                    "sending device signature in real time successful: $value"));
          },
          child: const Text("Send attributes"),
        )),
      ),
    );
  }
}
4
likes
0
pub points
79%
popularity

Publisher

unverified uploader

Flutter plugin for Shield SDK. SHIELD SDK helps developers to assess malicious activities performed on mobile devices and return risk intelligence based on user's behaviour.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_shieldfraud