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

Side by Side Diff: sky/sdk/lib/widgets/material.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/ink_well.dart ('k') | sky/sdk/lib/widgets/material_button.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 '../animation/animation_performance.dart'; 5 import '../animation/animation_performance.dart';
6 import '../painting/box_painter.dart'; 6 import '../painting/box_painter.dart';
7 import 'animated_component.dart'; 7 import 'animated_component.dart';
8 import 'animated_container.dart'; 8 import 'animated_container.dart';
9 import 'basic.dart'; 9 import 'basic.dart';
10 import 'default_text_style.dart'; 10 import 'default_text_style.dart';
(...skipping 29 matching lines...) Expand all
40 watchPerformance(_container.createPerformance( 40 watchPerformance(_container.createPerformance(
41 _container.shadow, duration: _kAnimateShadowDuration)); 41 _container.shadow, duration: _kAnimateShadowDuration));
42 watchPerformance(_container.createPerformance( 42 watchPerformance(_container.createPerformance(
43 _container.backgroundColor, duration: _kAnimateColorDuration)); 43 _container.backgroundColor, duration: _kAnimateColorDuration));
44 } 44 }
45 45
46 Widget child; 46 Widget child;
47 47
48 AnimatedContainer _container; 48 AnimatedContainer _container;
49 49
50 @override
50 void syncFields(Material source) { 51 void syncFields(Material source) {
51 child = source.child; 52 child = source.child;
52 _container.syncFields(source._container); 53 _container.syncFields(source._container);
53 super.syncFields(source); 54 super.syncFields(source);
54 } 55 }
55 56
56 Color _getBackgroundColor(MaterialType type, Color color) { 57 Color _getBackgroundColor(MaterialType type, Color color) {
57 if (color != null) 58 if (color != null)
58 return color; 59 return color;
59 switch (type) { 60 switch (type) {
60 case MaterialType.canvas: 61 case MaterialType.canvas:
61 return Theme.of(this).canvasColor; 62 return Theme.of(this).canvasColor;
62 case MaterialType.card: 63 case MaterialType.card:
63 return Theme.of(this).cardColor; 64 return Theme.of(this).cardColor;
64 default: 65 default:
65 return null; 66 return null;
66 } 67 }
67 } 68 }
68 69
69 Widget build() { 70 Widget build() {
70 return _container.build( 71 return _container.build(
71 new DefaultTextStyle(style: Theme.of(this).text.body1, child: child) 72 new DefaultTextStyle(style: Theme.of(this).text.body1, child: child)
72 ); 73 );
73 } 74 }
74 75
75 } 76 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/ink_well.dart ('k') | sky/sdk/lib/widgets/material_button.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698