mouse touch scroll
This commit is contained in:
parent
0a95b951a6
commit
4911c5b11c
|
@ -1,7 +1,8 @@
|
||||||
import 'package:event/event.dart';
|
import 'package:event/event.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pikapika/screens/InitScreen.dart';
|
import 'package:pikapika/screens/InitScreen.dart';
|
||||||
import 'package:pikapika/basic/Navigatior.dart';
|
import 'package:pikapika/basic/Navigator.dart';
|
||||||
|
import 'package:pikapika/screens/components/MouseAndTouchScrollBehavior.dart';
|
||||||
|
|
||||||
import 'basic/config/Themes.dart';
|
import 'basic/config/Themes.dart';
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@ class _PikapikaAppState extends State<PikapikaApp> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
|
scrollBehavior: mouseAndTouchScrollBehavior,
|
||||||
theme: currentThemeData(),
|
theme: currentThemeData(),
|
||||||
darkTheme: currentDarkTheme(),
|
darkTheme: currentDarkTheme(),
|
||||||
navigatorObservers: [navigatorObserver, routeObserver],
|
navigatorObservers: [navigatorObserver, routeObserver],
|
||||||
|
|
|
@ -3,7 +3,7 @@ import 'package:pikapika/basic/Common.dart';
|
||||||
import 'package:pikapika/basic/Cross.dart';
|
import 'package:pikapika/basic/Cross.dart';
|
||||||
import 'package:pikapika/basic/Entities.dart';
|
import 'package:pikapika/basic/Entities.dart';
|
||||||
import 'package:pikapika/screens/ComicsScreen.dart';
|
import 'package:pikapika/screens/ComicsScreen.dart';
|
||||||
import 'package:pikapika/basic/Navigatior.dart';
|
import 'package:pikapika/basic/Navigator.dart';
|
||||||
import 'package:pikapika/screens/components/CommentMainType.dart';
|
import 'package:pikapika/screens/components/CommentMainType.dart';
|
||||||
import 'package:pikapika/screens/components/ItemBuilder.dart';
|
import 'package:pikapika/screens/components/ItemBuilder.dart';
|
||||||
import 'package:pikapika/basic/Method.dart';
|
import 'package:pikapika/basic/Method.dart';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pikapika/basic/Entities.dart';
|
import 'package:pikapika/basic/Entities.dart';
|
||||||
import 'package:pikapika/basic/Navigatior.dart';
|
import 'package:pikapika/basic/Navigator.dart';
|
||||||
import 'package:pikapika/basic/Method.dart';
|
import 'package:pikapika/basic/Method.dart';
|
||||||
import 'ComicInfoScreen.dart';
|
import 'ComicInfoScreen.dart';
|
||||||
import 'DownloadExportToFileScreen.dart';
|
import 'DownloadExportToFileScreen.dart';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:pikapika/basic/Cross.dart';
|
||||||
import 'package:pikapika/basic/Entities.dart';
|
import 'package:pikapika/basic/Entities.dart';
|
||||||
import 'package:pikapika/basic/Method.dart';
|
import 'package:pikapika/basic/Method.dart';
|
||||||
import 'package:pikapika/screens/SearchScreen.dart';
|
import 'package:pikapika/screens/SearchScreen.dart';
|
||||||
import 'package:pikapika/basic/Navigatior.dart';
|
import 'package:pikapika/basic/Navigator.dart';
|
||||||
import '../ComicsScreen.dart';
|
import '../ComicsScreen.dart';
|
||||||
import 'Images.dart';
|
import 'Images.dart';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pikapika/screens/ComicsScreen.dart';
|
import 'package:pikapika/screens/ComicsScreen.dart';
|
||||||
import 'package:pikapika/basic/Navigatior.dart';
|
import 'package:pikapika/basic/Navigator.dart';
|
||||||
|
|
||||||
// 漫画tag
|
// 漫画tag
|
||||||
class ComicTagsCard extends StatelessWidget {
|
class ComicTagsCard extends StatelessWidget {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pikapika/basic/Navigatior.dart';
|
import 'package:pikapika/basic/Navigator.dart';
|
||||||
|
|
||||||
import '../ComicInfoScreen.dart';
|
import '../ComicInfoScreen.dart';
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
import 'dart:ui';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
final mouseAndTouchScrollBehavior = MouseAndTouchScrollBehavior();
|
||||||
|
|
||||||
|
class MouseAndTouchScrollBehavior extends MaterialScrollBehavior {
|
||||||
|
@override
|
||||||
|
Set<PointerDeviceKind> get dragDevices => {
|
||||||
|
PointerDeviceKind.touch,
|
||||||
|
PointerDeviceKind.mouse,
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue