mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
1) Factors InkWell out of Material so that components can use an ink well without needing the shadow/level machinery. 2) Makes the ink effect move at a different velocity once the tap has actually occurred, converging with the spec. We don't have the right speeds yet, but at least we're approaching the right shape. 3) To support (2), added a primaryPointer attribute to GestureEvents to let authors coorelate gesturetapdown events with later gesturetap events. 4) To support (2), modernized SplashAnimation to used AnimatedValue and friends. 5) Added more constants to view-configuration.dart that match Android. I've also removed the cancelling of the ink effect on scroll. The proper way to do that is to notice that someone in the event chain is listening for scrollstart and delay the beginning of the ink effect for some period of time. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1019023003
30 lines
1.2 KiB
Dart
30 lines
1.2 KiB
Dart
// 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.
|
|
|
|
// Modeled after Android's ViewConfiguration:
|
|
// https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/ViewConfiguration.java
|
|
|
|
const double kStatusBarHeight = 25.0;
|
|
const double kScrollbarSize = 10.0;
|
|
const double kScrollbarFadeDuration = 250.0;
|
|
const double kScrollbarFadeDelay = 300.0;
|
|
const double kFadingEdgeLength = 12.0;
|
|
const double kPressedStateDuration = 64.0;
|
|
const double kDefaultLongPressTimeout = 500.0;
|
|
const double kTapTimeout = 100.0;
|
|
const double kJumpTapTimeout = 500.0;
|
|
const double kDoubleTapTimeout = 300.0;
|
|
const double kDoubleTapMinTime = 40.0;
|
|
const double kHoverTapTimeout = 150.0;
|
|
const double kHoverTapSlop = 20.0;
|
|
const double kZoomControlsTimeout = 3000.0;
|
|
const double kEdgeSlop = 12.0;
|
|
const double kTouchSlop = 8.0;
|
|
const double kDoubleTapTouchSlop = kTouchSlop;
|
|
const double kPagingTouchSlop = kTouchSlop * 2.0;
|
|
const double kDoubleTapSlop = 100.0;
|
|
const double kWindowTouchSlop = 16.0;
|
|
const double kMinFlingVelocity = 50.0;
|
|
const double kMaxFlingVelocity = 8000.0;
|