pixel_color_image 1.0.0 copy "pixel_color_image: ^1.0.0" to clipboard
pixel_color_image: ^1.0.0 copied to clipboard

outdated

Pick the pixel color of a image. Super simple and Easy to use.

example/main.dart

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

/// Called while Hoverring
void onHover(int x, int y, Color color) async {
  debugPrint('Hover x: $x, y: $y, color: $color');
}

/// Called when tap
void onTap(int x, int y, Color color) async {
  debugPrint('Tap x: $x, y: $y, color: $color');
}

/// main
void main() async {
  // Get image bytes
  final imageBytes = await getImageBytesAsset("images/xxx.png");

  // Create widget
  final pixelColorImage = PixelColorImage(
    imageBytes: imageBytes,
    onHover: onHover,
    onTap: onTap,
  );

  // Create app
  final app = MaterialApp(
    home: Scaffold(
      body: pixelColorImage, // Use widget
    ),
  );

  // Run app
  runApp(app);
}
8
likes
0
pub points
61%
popularity

Publisher

verified publisherflut.rbdog.biz

Pick the pixel color of a image. Super simple and Easy to use.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, image

More

Packages that depend on pixel_color_image