mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-06-20 10:54:22 +08:00
Add mouse scroll to scale image
This commit is contained in:
2
lib/platform/media_query.dart
Normal file
2
lib/platform/media_query.dart
Normal file
@@ -0,0 +1,2 @@
|
||||
export './media_query_none.dart'
|
||||
if (dart.library.html) './media_query_web.dart';
|
||||
2
lib/platform/media_query_none.dart
Normal file
2
lib/platform/media_query_none.dart
Normal file
@@ -0,0 +1,2 @@
|
||||
bool get pointerIsMouse => false;
|
||||
bool get pointerIsTouch => false;
|
||||
5
lib/platform/media_query_web.dart
Normal file
5
lib/platform/media_query_web.dart
Normal file
@@ -0,0 +1,5 @@
|
||||
// ignore: avoid_web_libraries_in_flutter
|
||||
import 'dart:html';
|
||||
|
||||
bool get pointerIsMouse => window.matchMedia('(pointer: fine)').matches;
|
||||
bool get pointerIsTouch => window.matchMedia('(pointer: coarse)').matches;
|
||||
Reference in New Issue
Block a user