Fix difficulty scrolling email content on Android
This commit is contained in:
@@ -65,12 +65,12 @@ class _HtmlContentViewState extends State<HtmlContentViewer> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
if (PlatformInfo.isAndroid) {
|
if (PlatformInfo.isAndroid) {
|
||||||
_gestureRecognizers = {
|
_gestureRecognizers = {
|
||||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer(duration: _longPressGestureDuration)),
|
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer()),
|
||||||
Factory<ScaleGestureRecognizer>(() => ScaleGestureRecognizer()),
|
Factory<ScaleGestureRecognizer>(() => ScaleGestureRecognizer()),
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_gestureRecognizers = {
|
_gestureRecognizers = {
|
||||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer(duration: _longPressGestureDuration)),
|
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer(duration: _longPressGestureDurationIOS)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (PlatformInfo.isAndroid) {
|
if (PlatformInfo.isAndroid) {
|
||||||
@@ -211,7 +211,7 @@ class _HtmlContentViewState extends State<HtmlContentViewer> {
|
|||||||
|
|
||||||
if (!isScrollActivated && PlatformInfo.isIOS) {
|
if (!isScrollActivated && PlatformInfo.isIOS) {
|
||||||
newGestureRecognizers = {
|
newGestureRecognizers = {
|
||||||
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer(duration: _longPressGestureDuration)),
|
Factory<LongPressGestureRecognizer>(() => LongPressGestureRecognizer(duration: _longPressGestureDurationIOS)),
|
||||||
Factory<HorizontalDragGestureRecognizer>(() => HorizontalDragGestureRecognizer())
|
Factory<HorizontalDragGestureRecognizer>(() => HorizontalDragGestureRecognizer())
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -272,7 +272,7 @@ class _HtmlContentViewState extends State<HtmlContentViewer> {
|
|||||||
return NavigationActionPolicy.CANCEL;
|
return NavigationActionPolicy.CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Duration? get _longPressGestureDuration => const Duration(milliseconds: 100);
|
Duration? get _longPressGestureDurationIOS => const Duration(milliseconds: 100);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
|||||||
Reference in New Issue
Block a user