23 lines
633 B
Dart
23 lines
633 B
Dart
|
|
import 'package:flutter/material.dart' as material;
|
||
|
|
import 'package:flutter/widgets.dart' as widgets;
|
||
|
|
|
||
|
|
class AppScrollBehavior extends material.MaterialScrollBehavior {
|
||
|
|
const AppScrollBehavior();
|
||
|
|
|
||
|
|
@override
|
||
|
|
widgets.Widget buildScrollbar(
|
||
|
|
widgets.BuildContext context,
|
||
|
|
widgets.Widget child,
|
||
|
|
widgets.ScrollableDetails details,
|
||
|
|
) {
|
||
|
|
switch (details.direction) {
|
||
|
|
case widgets.AxisDirection.up:
|
||
|
|
case widgets.AxisDirection.down:
|
||
|
|
return child;
|
||
|
|
case widgets.AxisDirection.left:
|
||
|
|
case widgets.AxisDirection.right:
|
||
|
|
return super.buildScrollbar(context, child, details);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|