blob: 9b7973e2ace51798c8ab0e02916ec9fbe50ab5af [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:math';
import '../web_kit/web_kit.dart';
/// A view that allows the scrolling and zooming of its contained views.
///
/// Wraps [UIScrollView](https://developer.apple.com/documentation/uikit/uiscrollview?language=objc).
class UIScrollView {
/// Constructs a [UIScrollView] that is owned by [webView].
// TODO(bparrishMines): Remove ignore once constructor is implemented.
// ignore: avoid_unused_constructor_parameters
UIScrollView.fromWebView(WKWebView webView);
/// Point at which the origin of the content view is offset from the origin of the scroll view.
///
/// Represents [WKWebView.contentOffset](https://developer.apple.com/documentation/uikit/uiscrollview/1619404-contentoffset?language=objc).
Future<Point<double>> getContentOffset() {
throw UnimplementedError();
}
/// Move the scrolled position of this view.
///
/// This method is not a part of UIKit and is only a helper method to make
/// scrollBy atomic.
Future<void> scrollBy(Point<double> offset) {
throw UnimplementedError();
}
/// Set point at which the origin of the content view is offset from the origin of the scroll view.
///
/// The default value is `Point<double>(0.0, 0.0)`.
///
/// Sets [WKWebView.contentOffset](https://developer.apple.com/documentation/uikit/uiscrollview/1619404-contentoffset?language=objc).
Future<void> setContentOffset(FutureOr<Point<double>> offset) {
throw UnimplementedError();
}
}