Skip to content

Instantly share code, notes, and snippets.

@xSaCh
xSaCh / expandable_widget.dart
Created February 27, 2025 17:43
Flutter Widget allow child to grow / shrink based on userdrag. DragWidget's gesture will be prioritize that it's parents even if parent is scrollable like SingleChildScrollView.
import 'package:flutter/material.dart';
class ExpandableWidget extends StatefulWidget {
const ExpandableWidget({
super.key,
required this.child,
required this.dragWidget,
this.initHeight,
this.maxHeight,
this.minHeight,