Skip to content

kakzaki/liveness_cam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liveness camera for detecting fraud or detecting real person selfie

pub package pub package

Platform Support

Android iOS MacOS Web Linux Windows
✔️ ✔️ ️X ️X ️ X ️X

Android setup

No specific setup required

IOS

No specific setup required

EXAMPLE

import 'dart:io';
import 'package:flutter/material.dart';
import 'package:liveness_cam/liveness_cam.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> {
    final _livenessCam = LivenessCam();

    File? result;

    @override
    void initState() {
        super.initState();
    }

    @override
    Widget build(BuildContext context) {
     return MaterialApp(
      home: Scaffold(
       appBar: AppBar(
         title: const Text('Liveness Cam')
       ),
       body: Center(
         child: Column(
            children: [
              result != null ? Image.file(result!) : Container(),
              const SizedBox(height: 20,),
              Builder(builder: (context) {
                 return ElevatedButton(
                   onPressed: () {
                     _livenessCam.start(context).then((value) {
                        if (value != null) {
                           setState(() {
                             result = value;
                           });
                        }
                     });
                   },
                    child: const Text(
                      "Start",
                      style: TextStyle(fontSize: 19),
                    ));
              })
            ],
          ),
        ),
      ),
    );
  }
}

FUND

If you like my content, please consider buying me a coffee. Thank you for your support!

Buy Me A Coffee

ko-fi

bagi yang dari Indonesia bisa lewat saweria berikut

https://saweria.co/kakzaki

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published