zoom_color_picker 1.0.2 copy "zoom_color_picker: ^1.0.2" to clipboard
zoom_color_picker: ^1.0.2 copied to clipboard

A Flutter package for picking colors from an image with zoom functionality.

example/lib/main.dart

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

/// Entry point of the Zoom Color Picker demo application.
void main() => runApp(const MyApp());

/// Root widget of the application.
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Zoom Color Picker Demo',
      home: Scaffold(
        body: ZoomColorPicker(
          // Callback triggered when a pixel is tapped.
          // Returns the selected [Color] and its nearest name.
          onColorPicked: (color, colorName) {
            debugPrint('Selected Color: $color');
            debugPrint('Color Name: $colorName');
          },

          // Callback triggered when an image is picked.
          // Returns the image file path as a [String].
          onImagePicked: (imagePath) {
            debugPrint('Image saved to: $imagePath');
          },
        ),
      ),
    );
  }
}
1
likes
150
points
17
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package for picking colors from an image with zoom functionality.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

cupertino_icons, flutter, get, image_picker

More

Packages that depend on zoom_color_picker