FadingEdgeScrollView.fromSingleChildScrollView constructor
FadingEdgeScrollView.fromSingleChildScrollView({
- Key? key,
- required SingleChildScrollView child,
- double gradientFractionOnStart = 0.1,
- double gradientFractionOnEnd = 0.1,
Constructor for creating FadingEdgeScrollView with SingleChildScrollView as child child must have SingleChildScrollView.controller set
Implementation
factory FadingEdgeScrollView.fromSingleChildScrollView({
Key? key,
required SingleChildScrollView child,
double gradientFractionOnStart = 0.1,
double gradientFractionOnEnd = 0.1,
}) {
final controller = child.controller;
if (controller == null) {
throw Exception("Child must have controller set");
}
return FadingEdgeScrollView._internal(
key: key,
scrollController: controller,
scrollDirection: child.scrollDirection,
reverse: child.reverse,
gradientFractionOnStart: gradientFractionOnStart,
gradientFractionOnEnd: gradientFractionOnEnd,
child: child,
);
}