Skip to content

Instantly share code, notes, and snippets.

var source = [1, 2, 3];
var helper = [];
var target = [];
console.log(`source: ${source} helper: ${helper} target:${target}`);
function hanoi(n, from, help, to) {
if (n <= 0) return;
hanoi(n - 1, from, to, help);
@jhoffi
jhoffi / GradientRectSliderTrackShape.dart
Last active December 20, 2023 09:14
[TrackShape]: Class for flutter slider with gradient
import 'package:flutter/material.dart';
/// Based on https://www.youtube.com/watch?v=Wl4F5V6BoJw
class GradientRectSliderTrackShape extends SliderTrackShape
with BaseSliderTrackShape {
const GradientRectSliderTrackShape({
this.gradient = const LinearGradient(
colors: [
Colors.red,