Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: sky/examples/fn/widgets/drawer.dart

Issue 983733003: Add constants for material colors and shadows (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sky/examples/fn/widgets/drawerheader.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of widgets; 1 part of widgets;
2 2
3 const double _kWidth = 256.0; 3 const double _kWidth = 256.0;
4 const double _kMinFlingVelocity = 0.4; 4 const double _kMinFlingVelocity = 0.4;
5 const double _kMinAnimationDurationMS = 246.0; 5 const double _kMinAnimationDurationMS = 246.0;
6 const double _kMaxAnimationDurationMS = 600.0; 6 const double _kMaxAnimationDurationMS = 600.0;
7 const Cubic _kAnimationCurve = easeOut; 7 const Cubic _kAnimationCurve = easeOut;
8 8
9 class DrawerAnimation { 9 class DrawerAnimation {
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 class Drawer extends Component { 97 class Drawer extends Component {
98 98
99 static Style _style = new Style(''' 99 static Style _style = new Style('''
100 position: absolute; 100 position: absolute;
101 z-index: 2; 101 z-index: 2;
102 top: 0; 102 top: 0;
103 left: 0; 103 left: 0;
104 bottom: 0; 104 bottom: 0;
105 right: 0; 105 right: 0;
106 box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);''' 106 box-shadpw: ${Shadow[3]};'''
107 ); 107 );
108 108
109 static Style _maskStyle = new Style(''' 109 static Style _maskStyle = new Style('''
110 background-color: black; 110 background-color: black;
111 will-change: opacity; 111 will-change: opacity;
112 position: absolute; 112 position: absolute;
113 top: 0; 113 top: 0;
114 left: 0; 114 left: 0;
115 bottom: 0; 115 bottom: 0;
116 right: 0;''' 116 right: 0;'''
117 ); 117 );
118 118
119 static Style _contentStyle = new Style(''' 119 static Style _contentStyle = new Style('''
120 background-color: #FAFAFA; 120 background-color: ${Grey[50]};
121 will-change: transform; 121 will-change: transform;
122 position: absolute; 122 position: absolute;
123 z-index: 3; 123 z-index: 3;
124 width: 256px; 124 width: 256px;
125 top: 0; 125 top: 0;
126 left: 0; 126 left: 0;
127 bottom: 0;''' 127 bottom: 0;'''
128 ); 128 );
129 129
130 DrawerAnimation animation; 130 DrawerAnimation animation;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 style: _style, 178 style: _style,
179 inlineStyle: inlineStyle, 179 inlineStyle: inlineStyle,
180 children: [ mask, content ] 180 children: [ mask, content ]
181 )..events.listen('pointerdown', animation.handlePointerDown) 181 )..events.listen('pointerdown', animation.handlePointerDown)
182 ..events.listen('pointermove', animation.handlePointerMove) 182 ..events.listen('pointermove', animation.handlePointerMove)
183 ..events.listen('pointerup', animation.handlePointerUp) 183 ..events.listen('pointerup', animation.handlePointerUp)
184 ..events.listen('pointercancel', animation.handlePointerCancel); 184 ..events.listen('pointercancel', animation.handlePointerCancel);
185 185
186 } 186 }
187 } 187 }
OLDNEW
« no previous file with comments | « no previous file | sky/examples/fn/widgets/drawerheader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698