certiface_sdk 1.2.1 copy "certiface_sdk: ^1.2.1" to clipboard
certiface_sdk: ^1.2.1 copied to clipboard

SDK Flutter da Certiface para detecção de vida (liveness) e outras funcionalidades biométricas.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'app_store.dart';
import 'screens/home_screen.dart';
import 'screens/result_screen.dart';
import 'screens/session_screen.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final store = AppStore();
  await store.load();
  runApp(
    ChangeNotifierProvider.value(
      value: store,
      child: const MyApp(),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Certiface SDK Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xFF1D4ED8)),
        scaffoldBackgroundColor: const Color(0xFFF1F5F9),
        useMaterial3: true,
      ),
      home: const ExampleShell(),
    );
  }
}

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

  static const _pages = [
    HomeScreen(),
    SessionScreen(),
    ResultScreen(),
  ];

  @override
  Widget build(BuildContext context) {
    final store = context.watch<AppStore>();
    final index = store.selectedTabIndex;

    return Scaffold(
      body: IndexedStack(
        index: index,
        children: _pages,
      ),
      bottomNavigationBar: NavigationBar(
        selectedIndex: index,
        onDestinationSelected: store.setSelectedTabIndex,
        backgroundColor: Colors.white,
        indicatorColor: const Color(0xFFDBEAFE),
        destinations: const [
          NavigationDestination(
            icon: Icon(Icons.home_outlined),
            selectedIcon: Icon(Icons.home),
            label: 'Home',
          ),
          NavigationDestination(
            icon: Icon(Icons.key_outlined),
            selectedIcon: Icon(Icons.key),
            label: 'Credencial',
          ),
          NavigationDestination(
            icon: Icon(Icons.description_outlined),
            selectedIcon: Icon(Icons.description),
            label: 'Resultados',
          ),
        ],
      ),
    );
  }
}
0
likes
140
points
158
downloads

Documentation

API reference

Publisher

verified publisheroititec.com.br

Weekly Downloads

SDK Flutter da Certiface para detecção de vida (liveness) e outras funcionalidades biométricas.

Repository (GitHub)
View/report issues

Topics

#biometric #liveness #camera #authentication

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on certiface_sdk

Packages that implement certiface_sdk