| OLD | NEW |
| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 void syncFields(Material source) { | 50 void syncFields(Material source) { |
| 51 child = source.child; | 51 child = source.child; |
| 52 _container.syncFields(source._container); | 52 _container.syncFields(source._container); |
| 53 super.syncFields(source); | 53 super.syncFields(source); |
| 54 } | 54 } |
| 55 | 55 |
| 56 AnimatedColor _getBackgroundColor(MaterialType type, Color color) { | 56 AnimatedColor _getBackgroundColor(MaterialType type, Color color) { |
| 57 if (color == null) { | 57 if (color == null) { |
| 58 switch (type) { | 58 switch (type) { |
| 59 case MaterialType.canvas: color = Theme.of(this).canvasColor; break; | 59 case MaterialType.canvas: |
| 60 case MaterialType.card: color = Theme.of(this).cardColor; break; | 60 color = Theme.of(this).canvasColor; |
| 61 break; |
| 62 case MaterialType.card: |
| 63 color = Theme.of(this).cardColor; |
| 64 break; |
| 65 default: |
| 66 break; |
| 61 } | 67 } |
| 62 } | 68 } |
| 63 return color == null ? null : new AnimatedColor(color); | 69 return color == null ? null : new AnimatedColor(color); |
| 64 } | 70 } |
| 65 | 71 |
| 66 Widget build() { | 72 Widget build() { |
| 67 return _container.build( | 73 return _container.build( |
| 68 new DefaultTextStyle(style: Theme.of(this).text.body1, child: child) | 74 new DefaultTextStyle(style: Theme.of(this).text.body1, child: child) |
| 69 ); | 75 ); |
| 70 } | 76 } |
| 71 | 77 |
| 72 } | 78 } |
| OLD | NEW |