photo_analyzer 0.0.2
photo_analyzer: ^0.0.2 copied to clipboard
A Flutter package for photo analyzer that detects faces, estimates age and gender, and classifies NSFW (Not Safe for Work) content. This package uses advanced algorithms to analyze images and extract [...]
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:photo_analyzer/photo_analyzer.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final _photoAnalyzerPlugin = PhotoAnalyzer();
@override
void initState() {
super.initState();
initPlatformState();
}
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> initPlatformState() async {
try {
await _photoAnalyzerPlugin.initialize();
} on PlatformException {}
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
),
);
}
}