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

Side by Side Diff: sky/sdk/lib/widgets/drawer.dart

Issue 1226113007: Add @override annotation to known overriden methods (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « sky/sdk/lib/widgets/dialog.dart ('k') | sky/sdk/lib/widgets/drawer_header.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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:sky' as sky; 5 import 'dart:sky' as sky;
6 6
7 import '../animation/animation_performance.dart'; 7 import '../animation/animation_performance.dart';
8 import '../animation/curves.dart'; 8 import '../animation/curves.dart';
9 import '../theme/shadows.dart'; 9 import '../theme/shadows.dart';
10 import 'animated_component.dart'; 10 import 'animated_component.dart';
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 this.children, 105 this.children,
106 this.level: 0 106 this.level: 0
107 }) : super(key: key) { 107 }) : super(key: key) {
108 watchPerformance(controller.performance); 108 watchPerformance(controller.performance);
109 } 109 }
110 110
111 List<Widget> children; 111 List<Widget> children;
112 int level; 112 int level;
113 DrawerController controller; 113 DrawerController controller;
114 114
115 @override
115 void syncFields(Drawer source) { 116 void syncFields(Drawer source) {
116 children = source.children; 117 children = source.children;
117 level = source.level; 118 level = source.level;
118 controller = source.controller; 119 controller = source.controller;
119 super.syncFields(source); 120 super.syncFields(source);
120 } 121 }
121 122
122 // TODO(mpcomplete): the animation system should handle building, maybe? Or 123 // TODO(mpcomplete): the animation system should handle building, maybe? Or
123 // at least setting the transform. Figure out how this could work for things 124 // at least setting the transform. Figure out how this could work for things
124 // like fades, slides, rotates, pinch, etc. 125 // like fades, slides, rotates, pinch, etc.
126 @override
125 Widget build() { 127 Widget build() {
126 // TODO(mpcomplete): animate as a fade-in. 128 // TODO(mpcomplete): animate as a fade-in.
127 double scaler = controller.performance.progress; 129 double scaler = controller.performance.progress;
128 Color maskColor = new Color.fromARGB((0x7F * scaler).floor(), 0, 0, 0); 130 Color maskColor = new Color.fromARGB((0x7F * scaler).floor(), 0, 0, 0);
129 131
130 var mask = new Listener( 132 var mask = new Listener(
131 child: new Container(decoration: new BoxDecoration(backgroundColor: maskCo lor)), 133 child: new Container(decoration: new BoxDecoration(backgroundColor: maskCo lor)),
132 onGestureTap: controller.handleMaskTap 134 onGestureTap: controller.handleMaskTap
133 ); 135 );
134 136
(...skipping 10 matching lines...) Expand all
145 child: new Stack([ mask, content ]), 147 child: new Stack([ mask, content ]),
146 onPointerDown: controller.handlePointerDown, 148 onPointerDown: controller.handlePointerDown,
147 onPointerMove: controller.handlePointerMove, 149 onPointerMove: controller.handlePointerMove,
148 onPointerUp: controller.handlePointerUp, 150 onPointerUp: controller.handlePointerUp,
149 onPointerCancel: controller.handlePointerCancel, 151 onPointerCancel: controller.handlePointerCancel,
150 onGestureFlingStart: controller.handleFlingStart 152 onGestureFlingStart: controller.handleFlingStart
151 ); 153 );
152 } 154 }
153 155
154 } 156 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/dialog.dart ('k') | sky/sdk/lib/widgets/drawer_header.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698