fix: Possibly fix touchscreen scrolling on Linux phones

Unfortunately I can not test this by myself.
This commit is contained in:
Krille Fear 2021-09-20 08:49:00 +02:00
parent 9115d44b65
commit 27062e71c4
2 changed files with 12 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'utils/custom_scroll_behaviour.dart';
import 'utils/localized_exception_extension.dart';
import 'package:flutter_app_lock/flutter_app_lock.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
@ -118,6 +119,7 @@ class _FluffyChatAppState extends State<FluffyChatApp> {
key: _router,
title: '${AppConfig.applicationName}',
theme: theme,
scrollBehavior: CustomScrollBehavior(),
logs: kReleaseMode ? VLogs.none : VLogs.info,
darkTheme: darkTheme,
localizationsDelegates: L10n.localizationsDelegates,

View File

@ -0,0 +1,10 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
class CustomScrollBehavior extends MaterialScrollBehavior {
@override
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
};
}