mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-03 14:06:03 +00:00
19 lines
540 B
Dart
19 lines
540 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ScrollBehaviorModified extends ScrollBehavior {
|
|
const ScrollBehaviorModified();
|
|
@override
|
|
ScrollPhysics getScrollPhysics(BuildContext context) {
|
|
switch (getPlatform(context)) {
|
|
case TargetPlatform.iOS:
|
|
case TargetPlatform.macOS:
|
|
case TargetPlatform.android:
|
|
return const BouncingScrollPhysics();
|
|
case TargetPlatform.fuchsia:
|
|
case TargetPlatform.linux:
|
|
case TargetPlatform.windows:
|
|
return const ClampingScrollPhysics();
|
|
}
|
|
}
|
|
}
|