flutter_mediapipe 0.0.7 copy "flutter_mediapipe: ^0.0.7" to clipboard
flutter_mediapipe: ^0.0.7 copied to clipboard

The flutter mediapipe plugin project.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:flutter_mediapipe/flutter_mediapipe.dart';
import 'package:flutter_mediapipe/gen/landmark.pb.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter Mediapipe'),
        ),
        body: Container(
            child: NativeView(
                onViewCreated: (FlutterMediapipe c) => setState(() {
                      c.landMarksStream.listen(_onLandMarkStream);
                      c.platformVersion.then((content) => print(content));
                    }))),
      ),
    );
  }

  void _onLandMarkStream(NormalizedLandmarkList landmarkList) {
    landmarkList.landmark.asMap().forEach((int i, NormalizedLandmark value) {
      print('Index: $i \n' + '$value');
    });
  }
}
26
likes
130
points
984
downloads

Publisher

unverified uploader

Weekly Downloads

The flutter mediapipe plugin project.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, protobuf

More

Packages that depend on flutter_mediapipe