flutter_hsvcolor_picker 1.5.1 copy "flutter_hsvcolor_picker: ^1.5.1" to clipboard
flutter_hsvcolor_picker: ^1.5.1 copied to clipboard

A HSV color picker inspired by chrome devtools and a material color picker for your flutter app.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:flutter_hsvcolor_picker/flutter_hsvcolor_picker.dart';

// For a more detailed example, head over to:
// https://github.com/fluttercandies/flutter_hsvcolor_picker/tree/main/example/lib/complex_example

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      darkTheme: ThemeData.dark(),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final _colorNotifier = ValueNotifier<Color>(Colors.green);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(50),
          child: ValueListenableBuilder<Color>(
            valueListenable: _colorNotifier,
            builder: (_, color, __) {
              return ColorPicker(
                color: color,
                onChanged: (value) => color = value,
              );
            },
          ),
        ),
      ),
    );
  }
}
47
likes
160
pub points
92%
popularity

Publisher

verified publisherfluttercandies.com

A HSV color picker inspired by chrome devtools and a material color picker for your flutter app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on flutter_hsvcolor_picker