Skip to content

Commit

Permalink
[Presentation] Keep the old scrolling ui on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Sep 7, 2022
1 parent b8c1bea commit 9d84864
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CastIt.Android/lib/presentation/app_widget.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:ui';

import 'package:castit/application/bloc.dart';
import 'package:castit/generated/l10n.dart';
import 'package:castit/presentation/intro/intro_page.dart';
Expand Down Expand Up @@ -32,9 +34,20 @@ class AppWidget extends StatelessWidget {
locale: locale,
localizationsDelegates: delegates,
supportedLocales: S.delegate.supportedLocales,
scrollBehavior: MyCustomScrollBehavior(),
);
},
),
);
}
}

// Since 2.5 the scroll behavior changed on desktop,
// this keeps the old one working
class MyCustomScrollBehavior extends MaterialScrollBehavior {
@override
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
};
}

0 comments on commit 9d84864

Please sign in to comment.