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

outdated

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
0
pub points
75%
popularity

Publisher

unverified uploader

The flutter mediapipe plugin project.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, protobuf

More

Packages that depend on flutter_mediapipe