From 178148a12babee7462655779f2f7fd23110bab3d Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Mon, 17 Mar 2025 10:42:54 +0200 Subject: [PATCH] create cudstom scroll widget --- .../mih_layout/mih_single_child_scroll.dart | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Frontend/lib/mih_components/mih_layout/mih_single_child_scroll.dart diff --git a/Frontend/lib/mih_components/mih_layout/mih_single_child_scroll.dart b/Frontend/lib/mih_components/mih_layout/mih_single_child_scroll.dart new file mode 100644 index 00000000..76f964e7 --- /dev/null +++ b/Frontend/lib/mih_components/mih_layout/mih_single_child_scroll.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; + +class MihSingleChildScroll extends StatefulWidget { + final Widget child; + const MihSingleChildScroll({ + super.key, + required this.child, + }); + + @override + State createState() => _MihSingleChildScrollState(); +} + +class _MihSingleChildScrollState extends State { + @override + Widget build(BuildContext context) { + return SafeArea( + child: ScrollConfiguration( + behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false), + child: SingleChildScrollView( + child: widget.child, + ), + ), + ); + } +}