flutter_circle_color_picker 0.2.0
flutter_circle_color_picker: ^0.2.0 copied to clipboard

Flutter Android iOS web

A beatiful circle color picker which picks hsl color for flutter.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_circle_color_picker/flutter_circle_color_picker.dart';

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

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

class _MyAppState extends State<MyApp> {
  Color _currentColor = Colors.blue;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: _currentColor,
          title: const Text('Circle color picker sample'),
        ),
        body: SingleChildScrollView(
          child: Column(
            children: <Widget>[
              Center(
                child: CircleColorPicker(
                  initialColor: _currentColor,
                  onChanged: _onColorChanged,
                ),
              ),
              Center(
                child: CircleColorPicker(
                  initialColor: _currentColor,
                  onChanged: _onColorChanged,
                  colorCodeBuilder: (context, color) {
                    return Text(
                      'rgb(${color.red}, ${color.green}, ${color.blue})',
                      style: const TextStyle(
                        fontSize: 24,
                        fontWeight: FontWeight.bold,
                        color: Colors.black,
                      ),
                    );
                  },
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }

  void _onColorChanged(Color color) {
    setState(() => _currentColor = color);
  }
}
28
likes
110
pub points
86%
popularity

Publisher

itome.team

A beatiful circle color picker which picks hsl color for flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_circle_color_picker