Skip to content

Instantly share code, notes, and snippets.

View justkawal's full-sized avatar
:electron:
Let's talk

justkawal justkawal

:electron:
Let's talk
View GitHub Profile
@justkawal
justkawal / color_wheel_picker.dart
Last active April 29, 2021 16:27
Changes in Color Wheel of Flex Color Picker to convert to replace ring picker.
import 'dart:math' as math;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
/// A HSV color wheel based color picker for Flutter, used by FlexColorPicker.
///
/// The color wheel picker uses a custom painter to draw the HSV color wheel
/// and rectangle. It can also be used on its own in other color picker
/// implementations.
class RectangularColorWheelPicker extends StatefulWidget {
@justkawal
justkawal / scaling_gesture_detector.dart
Created March 11, 2020 10:59 — forked from klaszlo8207/scaling_gesture_detector.dart
Flutter ScalingGestureDetector for a 3D view (you can pan and zoom in/out)
import 'package:advert_app/utils/logging.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/gestures.dart';
class ScalingGestureDetector extends StatefulWidget {
final Widget child;
final void Function(Offset initialPoint) onPanStart;
final void Function(Offset initialPoint, Offset delta) onPanUpdate;
final void Function() onPanEnd;