hue_craft 0.0.8 copy "hue_craft: ^0.0.8" to clipboard
hue_craft: ^0.0.8 copied to clipboard

You can build your own custom color pickers easily with this package

example/lib/main.dart

import 'package:flutter/material.dart';

import 'utils/utils.dart';

import 'dialog/color_picker_one.dart';
import 'dialog/color_picker_two.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

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

class _MyHomePageState extends State<MyHomePage> {


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: const Text(
          'Example',
          style: TextStyle(
            color: Colors.white,
            fontSize: 20
          ),
        ),
        backgroundColor: Colors.blue,
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () {
                showDialogBox(
                  context: context,
                  child: const ColorPickerOneDialog()
                );
              },
              child: const Text(
                "Show color picker one"
              ),
            ),
            ElevatedButton(
              onPressed: () {
                showDialogBox(
                  context: context,
                  child: const ColorPickerTwoDialog()
                );
              },
              child: const Text(
                "Show color picker two"
              ),
            )
          ],
        ),
      ),
    );
  }
}
2
likes
140
points
122
downloads

Publisher

unverified uploader

Weekly Downloads

You can build your own custom color pickers easily with this package

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on hue_craft