tutelarfluttersdk 1.0.2 copy "tutelarfluttersdk: ^1.0.2" to clipboard
tutelarfluttersdk: ^1.0.2 copied to clipboard

Tutelar are risk management experts. Our high powered tech-enabled solutions simplify fraud risk management and automates auxiliary business processes enabling companies to focus on its core products [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:tutelarfluttersdk/tutelarfluttersdk.dart';
import 'package:tutelarfluttersdk_example/theme.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: AppTheme.lightTheme,
      home: const DemoApp(),
    );
  }
}

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

  @override
  State<DemoApp> createState() => _DemoAppState();
}

class _DemoAppState extends State<DemoApp> {
  late Tutelar tutelar;
  String detail = "";

  @override
  void initState() {
    super.initState();
    tutelar = Tutelar("tutpk_live_1f1Q2ZRtRbkZ");
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      child: ListView(
        scrollDirection: Axis.vertical,
        children: [
          Padding(
            padding:
                const EdgeInsets.only(left: 50, top: 25, right: 50, bottom: 0),
            child: ElevatedButton(
              onPressed: () async {
                var response = await tutelar.getDeviceDetails();
                setState(() {
                  if(response['success'] == true){
                    detail = response['data'];
                  }else{
                    detail = response['message'];
                  }
                  
                });
              },
              child: const Text(
                "GET DETAIL",
              ),
            ),
          ),
          Padding(
            padding: const EdgeInsets.all(30.0),
            child: Text(
              detail,
              style: const TextStyle(
                color: Colors.black,
                decoration: TextDecoration.none,
                fontSize: 12,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
1
likes
125
points
6
downloads

Publisher

unverified uploader

Weekly Downloads

Tutelar are risk management experts. Our high powered tech-enabled solutions simplify fraud risk management and automates auxiliary business processes enabling companies to focus on its core products and services.

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on tutelarfluttersdk

Packages that implement tutelarfluttersdk