mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-19 05:11:28 +03:00
remove dup Accessibility-Input solution;fix audio crash
This commit is contained in:
@@ -9,7 +9,6 @@ abstract class PageShape extends Widget {
|
||||
final String title = "";
|
||||
final Icon icon = Icon(null);
|
||||
final List<Widget> appBarActions = [];
|
||||
final ScrollController? scrollController = null;
|
||||
}
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
@@ -72,20 +71,7 @@ class _HomePageState extends State<HomePage> {
|
||||
_selectedIndex = index;
|
||||
}),
|
||||
),
|
||||
body: Listener(
|
||||
onPointerMove: (evt) {
|
||||
final page = _pages.elementAt(_selectedIndex);
|
||||
|
||||
/// Flutter can't not catch PointerMoveEvent when size is 1
|
||||
/// This will happen in Android AccessibilityService Input
|
||||
/// android can't init dispatching size yet ,see: https://stackoverflow.com/questions/59960451/android-accessibility-dispatchgesture-is-it-possible-to-specify-pressure-for-a
|
||||
/// use this temporary solution until flutter or android fixes the bug
|
||||
if (evt.size == 1 && page.scrollController != null) {
|
||||
final offset = page.scrollController!.offset.toDouble();
|
||||
page.scrollController!.jumpTo(offset - evt.delta.dy);
|
||||
}
|
||||
},
|
||||
child: _pages.elementAt(_selectedIndex)),
|
||||
body: _pages.elementAt(_selectedIndex),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user