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

Human body part selection with desired color.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:human_body_selector/human_body_selector.dart';
import 'package:human_body_selector/svg_painter/maps.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> {

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


  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Human body selector example'),
        ),
        backgroundColor: Colors.grey,
        body: const MySelector(),
      ),
    );
  }
}

class MySelector extends StatelessWidget {
  const MySelector({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: HumanBodySelector(
        map: Maps.HUMAN,
        onChanged: (bodyPart, active) {},
        onLevelChanged: (bodyPart) {},
        multiSelect: true,
        toggle: true,
        height: MediaQuery.of(context).size.height,
        width: MediaQuery.of(context).size.width-100,
      ),
    );
  }
}
6
likes
90
pub points
66%
popularity

Publisher

unverified uploader

Human body part selection with desired color.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

equatable, flutter, path_drawing, svg_path_parser

More

Packages that depend on human_body_selector