"Fossies" - the Fresh Open Source Software Archive

Member "flutter-1.22.4/packages/flutter/lib/src/material/curves.dart" (13 Nov 2020, 1324 Bytes) of package /linux/misc/flutter-1.22.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Dart source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // Copyright 2014 The Flutter Authors. All rights reserved.
    2 // Use of this source code is governed by a BSD-style license that can be
    3 // found in the LICENSE file.
    4 
    5 // @dart = 2.8
    6 
    7 import 'package:flutter/animation.dart';
    8 
    9 // The easing curves of the Material Library
   10 
   11 /// The standard easing curve in the Material specification.
   12 ///
   13 /// Elements that begin and end at rest use standard easing.
   14 /// They speed up quickly and slow down gradually, in order
   15 /// to emphasize the end of the transition.
   16 ///
   17 /// See also:
   18 /// * <https://material.io/design/motion/speed.html#easing>
   19 const Curve standardEasing = Curves.fastOutSlowIn;
   20 
   21 /// The accelerate easing curve in the Material specification.
   22 ///
   23 /// Elements exiting a screen use acceleration easing,
   24 /// where they start at rest and end at peak velocity.
   25 ///
   26 /// See also:
   27 /// * <https://material.io/design/motion/speed.html#easing>
   28 const Curve accelerateEasing = Cubic(0.4, 0.0, 1.0, 1.0);
   29 
   30 /// The decelerate easing curve in the Material specification.
   31 ///
   32 /// Incoming elements are animated using deceleration easing,
   33 /// which starts a transition at peak velocity (the fastest
   34 /// point of an element’s movement) and ends at rest.
   35 ///
   36 /// See also:
   37 /// * <https://material.io/design/motion/speed.html#easing>
   38 const Curve decelerateEasing = Cubic(0.0, 0.0, 0.2, 1.0);