Skip to content

Commit

Permalink
custom scroll behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
HemantKArya committed Jul 10, 2024
1 parent 4cacb89 commit 4a8656b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import 'package:Bloomee/services/file_manager.dart';
import 'package:Bloomee/utils/external_list_importer.dart';
import 'package:Bloomee/utils/ticker.dart';
import 'package:Bloomee/utils/url_checker.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:Bloomee/blocs/add_to_playlist/cubit/add_to_playlist_cubit.dart';
Expand Down Expand Up @@ -231,6 +232,7 @@ class _MyAppState extends State<MyApp> {
scaffoldMessengerKey: SnackbarService.messengerKey,
routerConfig: GlobalRoutes.globalRouter,
theme: Default_Theme().defaultThemeData,
scrollBehavior: CustomScrollBehavior(),
);
}
},
Expand All @@ -239,3 +241,13 @@ class _MyAppState extends State<MyApp> {
);
}
}

class CustomScrollBehavior extends MaterialScrollBehavior {
// Override behavior methods and getters like dragDevices
@override
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
// etc.
};
}

0 comments on commit 4a8656b

Please sign in to comment.