This commit is contained in:
2026-06-28 16:12:57 +03:00
parent f2d444cb16
commit 5891440a0c
3 changed files with 125 additions and 76 deletions
@@ -226,32 +226,6 @@ class _AccountEditorOverlayState extends State<AccountEditorOverlay> {
),
),
),
Positioned(
top: cardTop - 28,
left: 0,
right: 0,
child: Center(
child: _HeightHandle(
onDrag: (delta) {
final newHeight = cardHeight - delta * 2;
ref.read(cardHeightProvider.notifier).set(newHeight);
},
),
),
),
Positioned(
top: cardTop + cardHeight + 6,
left: 0,
right: 0,
child: Center(
child: _HeightHandle(
onDrag: (delta) {
final newHeight = cardHeight + delta * 2;
ref.read(cardHeightProvider.notifier).set(newHeight);
},
),
),
),
Positioned(
top: editorPanelTop,
left: 20,
@@ -495,36 +469,3 @@ class _AccountEditorOverlayState extends State<AccountEditorOverlay> {
);
}
}
class _HeightHandle extends StatefulWidget {
final ValueChanged<double> onDrag;
const _HeightHandle({required this.onDrag});
@override
State<_HeightHandle> createState() => _HeightHandleState();
}
class _HeightHandleState extends State<_HeightHandle> {
bool _active = false;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return GestureDetector(
onVerticalDragStart: (_) => setState(() => _active = true),
onVerticalDragUpdate: (details) => widget.onDrag(details.delta.dy),
onVerticalDragEnd: (_) => setState(() => _active = false),
behavior: HitTestBehavior.opaque,
child: AnimatedContainer(
duration: const Duration(milliseconds: 150),
width: _active ? 56 : 44,
height: _active ? 6 : 4,
decoration: BoxDecoration(
color: theme.colorScheme.onSurface.withOpacity(_active ? 0.5 : 0.25),
borderRadius: BorderRadius.circular(3),
),
),
);
}
}