create cudstom scroll widget
This commit is contained in:
@@ -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<MihSingleChildScroll> createState() => _MihSingleChildScrollState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MihSingleChildScrollState extends State<MihSingleChildScroll> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SafeArea(
|
||||||
|
child: ScrollConfiguration(
|
||||||
|
behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: widget.child,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user