mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Added FlingGestureRecognizer and exposed it in the GestureDetector class. FlingGestureRecognizer is based on the Android/Chromium VelocityTracker class which computes a velocity vector for for a list of X,Y,Time tuples. The Scrollable classes now use the FlingGestureRecognizer. Dismissable and Drawer still need to be updated
15 lines
367 B
C++
15 lines
367 B
C++
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "sky/engine/core/events/GestureVelocity.h"
|
|
|
|
namespace blink {
|
|
|
|
GestureVelocity::GestureVelocity(bool valid, float x, float y)
|
|
: m_is_valid(valid), m_x(x), m_y(y)
|
|
{
|
|
}
|
|
|
|
} // namespace blink
|