getScrollPos static method
Gets the horizontal and vertical scroll position in the current document viewer.
The scroll position is returned as a Map<String, int>
with the keys
"horizontal" and "vertical".
Implementation
static Future<Map?> getScrollPos() async {
String jsonString = await _channel.invokeMethod(Functions.getScrollPos);
dynamic json = jsonDecode(jsonString);
Map scrollPos = {
'horizontal': json['horizontal'],
'vertical': json['vertical']
};
return scrollPos;
}