quake_tensorflow_face_rec 0.0.1 copy "quake_tensorflow_face_rec: ^0.0.1" to clipboard
quake_tensorflow_face_rec: ^0.0.1 copied to clipboard

outdated

夸克tensorFlow人脸识别插件

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:quake_tensorflow_face_rec/quake_tensorflow_face_rec.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    String platformVersion;
    // Platform messages may fail, so we use a try/catch PlatformException.
    // We also handle the message potentially returning null.
    try {
      platformVersion =
          await QuakeTensorflowFaceRec.platformVersion ?? 'Unknown platform version';
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _platformVersion = platformVersion;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child:
          Column(
            children: <Widget>[
              Text('Running on: $_platformVersion\n'),
              RaisedButton(
                child: const Text(
                  '人脸识别',
                  style: TextStyle(
                    fontSize: 28.0,
                  ),
                ),
                onPressed: () async {
                  String? message =
                  await QuakeTensorflowFaceRec.jumpToFaceRec("SignIn","1103","[[-0.008751192, 0.0030202484, -0.012142694, 0.008064498, -0.0032106566, -0.10088397, 0.022745172, 0.15712303, -0.08237792, 0.13241206, 0.011892387, -0.0021597883, 0.010355831, -0.0032959005, -0.0024689536, -0.14141938, -0.008483222, 0.011521982, 0.0064745145, -0.005759604, -0.008408178, -0.0076640095, -0.08311933, 0.0029512255, 0.14313698, -0.007692932, -0.0015752659, -0.039180834, 0.043464802, 0.049718738, 0.01061034, 0.12223226, 0.14185165, -0.0034577814, 0.13974974, -0.035920892, -0.048121527, 0.015394894, -8.94153E-4, -0.021783143, -0.003063411, -0.0011778879, -0.00908877, 0.008577126, 0.009608789, 0.080498956, 0.0068448437, 0.18244676, -0.0034980248, -0.022942197, 0.10771534, 4.068308E-4, -0.12314866, 8.6295063E-4, 0.09720795, 0.0014791933, 0.037730075, 0.0011833013, 0.015216509, -0.008578452, -4.0508492E-4, 0.08227055, -0.07701273, 0.19879182, 0.0066302274, 0.12444461, -0.004993223, -0.01993386, 0.0044099325, -3.2235336E-4, 0.0035031864, -0.3148847, 0.30309716, -0.0063782753, -0.06926931, -1.298429E-4, -0.008203556, 0.0015328304, -0.16128798, -0.02257527, 8.3492935E-4, -0.0064128283, -0.0038262936, 0.13101919, -0.0060613262, 0.0010740443, 0.005416932, 0.1406614, -0.045120794, 0.10148759, -0.08596581, 0.0049291416, 0.0023064984, -7.263122E-4, -0.19451232, 0.11345557, 0.029701276, -0.031694744, -0.002377842, 0.0026213117, -5.350538E-4, 0.0020563, -0.0054276627, -3.0616537E-4, 0.015427064, 0.0037418625, 0.0075437743, 0.0046805777, 6.9766317E-4, 0.008066668, -0.012650778, 0.005144567, 0.008325037, 0.17213933, -0.003152059, -0.14782989, 0.016044632, -0.010664162, 0.23192707, -0.046807304, -0.06824358, -0.0458375, -0.05999119, 0.002810394, 0.0027989428, 0.008333594, 0.009836853, -0.007726485, 3.131237E-4, 0.09757385, 0.0017332282, 0.0031282997, -0.004601523, 0.050573114, 0.015647318, -0.00699634, -0.060013007, -0.12783349, -0.010604098, -0.007899491, 0.0025910353, -0.0051525314, -0.005615167, -0.10900332, -0.13414702, 0.03077083, -0.011020182, 0.0047441595, -0.001166168, 0.0071230032, -0.0034031235, -0.12707235, 0.023864884, -0.0057265023, 0.0073658237, 0.0010447296, 0.010785962, -0.005117901, -0.12095976, -0.0037111843, 0.004095217, 0.0050687212, 0.007559834, -0.008354545, 0.0074513946, 0.008290464, 0.0037448974, 0.10893786, 0.004889087, 0.0010725535, -0.0036997418, -0.062126495, 0.0016028188, 0.0633276, -0.010374747, -0.008538342, -0.009471571, 0.023007818, -0.0021869107, -0.004102411, -0.054200485, -0.029808749, -0.004346112, -0.0041573066, -0.19853769, 0.25992683, 0.018096337, -0.008681233, 0.032144453, -0.025189253, 0.004749334, -0.008277817]]");
                  // ignore: avoid_print
                  print("Dart层:" + message!);
                },
              ),
            ],
          ),

        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

夸克tensorFlow人脸识别插件

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on quake_tensorflow_face_rec