Commit 56daecf1 by Chokmongkhon Jansanom

feat: env in example.

parent 2c303f0d
......@@ -41,3 +41,6 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
*.env
env.g.dart
import 'package:envied/envied.dart';
part 'env.g.dart';
@Envied()
abstract class Env {
@EnviedField(varName: 'LUXAND_LICENSE_KEY')
static const String luxandLicenseKey = _Env.luxandLicenseKey;
}
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:myhr_facescan/enroll/index.dart';
import 'package:myhr_facescan/myhr_facescan.dart';
import 'package:myhr_facescan_example/env.dart';
void main() {
runApp(const MyApp());
......@@ -51,7 +48,7 @@ class EnrollPage extends StatelessWidget {
body: const SafeArea(
child: SingleChildScrollView(
child: EnrollFace(
licenseKey: '',
licenseKey: Env.luxandLicenseKey,
),
)),
);
......
......@@ -18,6 +18,7 @@ dependencies:
sdk: flutter
get:
envied: ^0.5.3
myhr_facescan:
# When depending on this package from a real application you should use:
# myhr_facescan: ^x.y.z
......@@ -42,6 +43,8 @@ dev_dependencies:
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.0
envied_generator: 0.5.3
build_runner: 2.4.8
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment