Files
GitJournal/lib/widgets/scroll_view_without_animation.dart
Vishesh Handa 8267d420a7 LoginPage: Add GitJournal header
+ cleanup the code a little
2020-11-18 16:39:15 +01:00

26 lines
633 B
Dart

import 'package:flutter/material.dart';
class ScrollViewWithoutAnimation extends StatelessWidget {
final Widget child;
final Axis scrollDirection;
ScrollViewWithoutAnimation({
@required this.child,
this.scrollDirection = Axis.vertical,
});
@override
Widget build(BuildContext context) {
return NotificationListener<OverscrollIndicatorNotification>(
onNotification: (OverscrollIndicatorNotification overScroll) {
overScroll.disallowGlow();
return false;
},
child: SingleChildScrollView(
scrollDirection: scrollDirection,
child: child,
),
);
}
}