"Fossies" - the Fresh Open Source Software Archive

Member "flutter-1.22.4/packages/flutter/lib/src/material/constants.dart" (13 Nov 2020, 2063 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/painting.dart';
    8 
    9 /// The minimum dimension of any interactive region according to Material
   10 /// guidelines.
   11 ///
   12 /// This is used to avoid small regions that are hard for the user to interact
   13 /// with. It applies to both dimensions of a region, so a square of size
   14 /// kMinInteractiveDimension x kMinInteractiveDimension is the smallest
   15 /// acceptable region that should respond to gestures.
   16 ///
   17 /// See also:
   18 ///
   19 ///  * [kMinInteractiveDimensionCupertino]
   20 ///  * The Material spec on touch targets at <https://material.io/design/usability/accessibility.html#layout-typography>.
   21 const double kMinInteractiveDimension = 48.0;
   22 
   23 /// The height of the toolbar component of the [AppBar].
   24 const double kToolbarHeight = 56.0;
   25 
   26 /// The height of the bottom navigation bar.
   27 const double kBottomNavigationBarHeight = 56.0;
   28 
   29 /// The height of a tab bar containing text.
   30 const double kTextTabBarHeight = kMinInteractiveDimension;
   31 
   32 /// The amount of time theme change animations should last.
   33 const Duration kThemeChangeDuration = Duration(milliseconds: 200);
   34 
   35 /// The radius of a circular material ink response in logical pixels.
   36 const double kRadialReactionRadius = 20.0;
   37 
   38 /// The amount of time a circular material ink response should take to expand to its full size.
   39 const Duration kRadialReactionDuration = Duration(milliseconds: 100);
   40 
   41 /// The value of the alpha channel to use when drawing a circular material ink response.
   42 const int kRadialReactionAlpha = 0x1F;
   43 
   44 /// The duration of the horizontal scroll animation that occurs when a tab is tapped.
   45 const Duration kTabScrollDuration = Duration(milliseconds: 300);
   46 
   47 /// The horizontal padding included by [Tab]s.
   48 const EdgeInsets kTabLabelPadding = EdgeInsets.symmetric(horizontal: 16.0);
   49 
   50 /// The padding added around material list items.
   51 const EdgeInsets kMaterialListPadding = EdgeInsets.symmetric(vertical: 8.0);