import 'dart:io'; import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:permission_handler/permission_handler.dart'; import 'home_page.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); if (Platform.isAndroid) { if (await Permission.storage.request().isGranted) { runApp(const MyApp()); } } else { runApp(const MyApp()); } } class AppScrollBehavior extends MaterialScrollBehavior { @override Set get dragDevices => { PointerDeviceKind.touch, PointerDeviceKind.mouse, PointerDeviceKind.trackpad }; } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', scrollBehavior: AppScrollBehavior(), theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage(title: 'Gallery'), ); } }