myhr_facescan 1.0.1 copy "myhr_facescan: ^1.0.1" to clipboard
myhr_facescan: ^1.0.1 copied to clipboard

Enroll face using luxand, verify real people by using active liveness detection

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:myhr_facescan_example/active_liveness/index.dart';
import 'package:myhr_facescan_example/enroll/index.dart';
import 'package:myhr_facescan_example/match_face/index.dart';
import 'package:myhr_facescan_example/template_controller.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return const GetMaterialApp(home: HomePage());
  }
}

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

  @override
  Widget build(BuildContext context) {
    var con = Get.put(TemplateController());

    return Scaffold(
      appBar: AppBar(
        title: const Text('Luxand x Flutter'),
      ),
      body: Center(
        child: Column(
          children: [
            ElevatedButton(
                onPressed: () => Get.to(const EnrollPage()),
                child: const Text('Enroll Face')),
            ElevatedButton(
                onPressed: () => Get.to(const ActiveLivenessPage()),
                child: const Text('Active Liveness')),
            ElevatedButton(
                onPressed: () => Get.to(const MatchFacePage()),
                child: const Text('Match Face')),
            ElevatedButton(
                onPressed: () async {
                  con.removeAll();
                  Get.snackbar('Success', 'Template in device is removed.');
                },
                child: const Text('Clear storage')),
            ElevatedButton(
                onPressed: () async {
                  Get.snackbar('Total: ${con.templates.length}', '');
                },
                child: const Text('Get total template')),
          ],
        ),
      ),
    );
  }
}
1
likes
125
points
8
downloads

Publisher

unverified uploader

Weekly Downloads

Enroll face using luxand, verify real people by using active liveness detection

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

camera, flutter, get, image, plugin_platform_interface

More

Packages that depend on myhr_facescan

Packages that implement myhr_facescan