fix scroll not working on web
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sheetless/storage_helper.dart';
|
||||
@@ -115,7 +116,13 @@ class _SheetsWidgetState extends State<SheetsWidget> {
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
// Fixes scroll on web
|
||||
child: ScrollConfiguration(
|
||||
behavior: ScrollConfiguration.of(context).copyWith(
|
||||
dragDevices: {PointerDeviceKind.touch, PointerDeviceKind.mouse},
|
||||
),
|
||||
child: ListView.builder(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
itemCount: filteredSheets.length,
|
||||
itemBuilder: (context, index) {
|
||||
var sheet = filteredSheets[index];
|
||||
@@ -131,6 +138,7 @@ class _SheetsWidgetState extends State<SheetsWidget> {
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user