| 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 'dart:sky'; | 5 import 'dart:sky'; |
| 6 | 6 |
| 7 enum FontWeight { | 7 enum FontWeight { |
| 8 w100, | 8 w100, |
| 9 w200, | 9 w200, |
| 10 w300, | 10 w300, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 fontSize: fontSize != null ? fontSize : this.fontSize, | 98 fontSize: fontSize != null ? fontSize : this.fontSize, |
| 99 fontWeight: fontWeight != null ? fontWeight : this.fontWeight, | 99 fontWeight: fontWeight != null ? fontWeight : this.fontWeight, |
| 100 textAlign: textAlign != null ? textAlign : this.textAlign, | 100 textAlign: textAlign != null ? textAlign : this.textAlign, |
| 101 decoration: decoration != null ? decoration : this.decoration, | 101 decoration: decoration != null ? decoration : this.decoration, |
| 102 decorationColor: decorationColor != null ? decorationColor : this.decorati
onColor, | 102 decorationColor: decorationColor != null ? decorationColor : this.decorati
onColor, |
| 103 decorationStyle: decorationStyle != null ? decorationStyle : this.decorati
onStyle | 103 decorationStyle: decorationStyle != null ? decorationStyle : this.decorati
onStyle |
| 104 ); | 104 ); |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool operator ==(other) { | 107 bool operator ==(other) { |
| 108 if (identical(this, other)) |
| 109 return true; |
| 108 return other is TextStyle && | 110 return other is TextStyle && |
| 109 color == other.color && | 111 color == other.color && |
| 110 fontFamily == other.fontFamily && | 112 fontFamily == other.fontFamily && |
| 111 fontSize == other.fontSize && | 113 fontSize == other.fontSize && |
| 112 fontWeight == other.fontWeight && | 114 fontWeight == other.fontWeight && |
| 113 textAlign == other.textAlign && | 115 textAlign == other.textAlign && |
| 114 decoration == other.decoration && | 116 decoration == other.decoration && |
| 115 decorationColor == other.decorationColor && | 117 decorationColor == other.decorationColor && |
| 116 decorationStyle == other.decorationStyle; | 118 decorationStyle == other.decorationStyle; |
| 117 } | 119 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 result.add('${prefix}decoration: ${_decorationToString()}'); | 186 result.add('${prefix}decoration: ${_decorationToString()}'); |
| 185 if (decorationColor != null) | 187 if (decorationColor != null) |
| 186 result.add('${prefix}decorationColor: $decorationColor'); | 188 result.add('${prefix}decorationColor: $decorationColor'); |
| 187 if (decorationStyle != null) | 189 if (decorationStyle != null) |
| 188 result.add('${prefix}decorationStyle: $decorationStyle'); | 190 result.add('${prefix}decorationStyle: $decorationStyle'); |
| 189 if (result.isEmpty) | 191 if (result.isEmpty) |
| 190 return '${prefix}<no style specified>'; | 192 return '${prefix}<no style specified>'; |
| 191 return result.join('\n'); | 193 return result.join('\n'); |
| 192 } | 194 } |
| 193 } | 195 } |
| OLD | NEW |