import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:myhr_facescan/enroll/index.dart';
import 'package:myhr_facescan_example/enroll/liveness.dart';
import 'package:myhr_facescan_example/env.dart';

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Enroll Face'),
      ),
      body: SafeArea(
          child: EnrollFace(
        licenseKey: Env.luxandLicenseKey,
        onFinish: (templates) {
          // var con = Get.find<TemplateController>();

          // con.add(FaceTemplate(
          //     id: 'NaeNaee', eye: templates[0].eye, face: templates[0].face));

          // Get.snackbar('Success', 'Face & Eye tempalte saved in device.');
          // Get.offAll(const HomePage());

          Get.off(LivenessPage(templates: templates));
        },
      )),
    );
  }
}
