mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-12 22:24:40 +08:00
26 lines
617 B
Dart
26 lines
617 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ScrollViewWithoutAnimation extends StatelessWidget {
|
|
final Widget child;
|
|
final Axis scrollDirection;
|
|
|
|
ScrollViewWithoutAnimation({
|
|
@required this.child,
|
|
this.scrollDirection,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return NotificationListener<OverscrollIndicatorNotification>(
|
|
onNotification: (OverscrollIndicatorNotification overScroll) {
|
|
overScroll.disallowGlow();
|
|
return false;
|
|
},
|
|
child: SingleChildScrollView(
|
|
scrollDirection: scrollDirection,
|
|
child: child,
|
|
),
|
|
);
|
|
}
|
|
}
|