selfie_liveness 3.3.9 copy "selfie_liveness: ^3.3.9" to clipboard
selfie_liveness: ^3.3.9 copied to clipboard

discontinued
PlatformAndroidiOS

A flutter liveness camera plugin for detecting fraud or detecting real person selfie

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:io';
import 'package:selfie_liveness/selfie_liveness.dart';

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

class ElatechLiveliness extends StatefulWidget {
  const ElatechLiveliness({Key? key}) : super(key: key);
  @override
  State<StatefulWidget> createState() {
    return _ElatechLiveliness();
  }
}

class _ElatechLiveliness extends State<ElatechLiveliness> {
  String value = "";

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SizedBox(
          width: double.infinity,
          child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
            value != ""
                ? Image.file(File(value), key: UniqueKey())
                : const SizedBox(),
            const Text("Press The Button To Take Photo"),
            ElevatedButton(
                onPressed: () async {
                  value = await SelfieLiveness.detectLiveness(
                    poweredBy: "",
                    assetLogo: "assets/raven_logo_white.png",
                    compressQualityandroid: 88,
                    compressQualityiOS: 88,
                  );
                  if (value.isEmpty) {
                    return;
                  }
                  await FileImage(File(value)).evict();
                  setState(() {});
                },
                child: const Text("Click Me"))
          ]),
        ),
      ),
    );
  }
}
4
likes
105
points
10
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter liveness camera plugin for detecting fraud or detecting real person selfie

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, flutter_image_compress, http, http_parser, mime, path_provider, plugin_platform_interface

More

Packages that depend on selfie_liveness

Packages that implement selfie_liveness