face_match_liveness 1.0.0
face_match_liveness: ^1.0.0 copied to clipboard
A Flutter plugin for face verification and liveness detection using MobileFaceNet and ML Kit. Supports image-to-image and image-to-liveness comparison.
import 'package:example/src/main_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Face Match Liveness',
theme: ThemeData(
primarySwatch: Colors.blue,
primaryColor: Colors.blue[700],
visualDensity: VisualDensity.adaptivePlatformDensity,
fontFamily: 'Roboto',
appBarTheme: AppBarTheme(
backgroundColor: Colors.blue[700],
foregroundColor: Colors.white,
elevation: 0,
centerTitle: true,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.light,
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.blue[700],
foregroundColor: Colors.white,
elevation: 2,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
foregroundColor: Colors.blue[700],
side: BorderSide(color: Colors.blue[700]!),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: Colors.blue[700]!),
),
),
),
home: const MainPage(),
);
}
}