✨ Allow use mosue drag to scroll vertical lists
This commit is contained in:
@@ -240,6 +240,7 @@ class IslandApp extends HookConsumerWidget {
|
|||||||
themeMode: ThemeMode.system,
|
themeMode: ThemeMode.system,
|
||||||
routerConfig: router,
|
routerConfig: router,
|
||||||
supportedLocales: context.supportedLocales,
|
supportedLocales: context.supportedLocales,
|
||||||
|
scrollBehavior: AppScrollBehavior(),
|
||||||
localizationsDelegates: [
|
localizationsDelegates: [
|
||||||
...context.localizationDelegates,
|
...context.localizationDelegates,
|
||||||
CroppyLocalizations.delegate,
|
CroppyLocalizations.delegate,
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:ui';
|
||||||
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
@@ -15,6 +16,14 @@ import 'package:material_symbols_icons/material_symbols_icons.dart';
|
|||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:styled_widget/styled_widget.dart';
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
|
||||||
|
class AppScrollBehavior extends MaterialScrollBehavior {
|
||||||
|
@override
|
||||||
|
Set<PointerDeviceKind> get dragDevices => {
|
||||||
|
PointerDeviceKind.touch, // default
|
||||||
|
PointerDeviceKind.mouse, // add mouse dragging
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
class WindowScaffold extends HookConsumerWidget {
|
class WindowScaffold extends HookConsumerWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
const WindowScaffold({super.key, required this.child});
|
const WindowScaffold({super.key, required this.child});
|
||||||
|
Reference in New Issue
Block a user