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:math' as math; | 5 import 'dart:math' as math; |
6 import 'box.dart'; | 6 import 'box.dart'; |
7 import 'object.dart'; | 7 import 'object.dart'; |
8 | 8 |
9 class FlexBoxParentData extends BoxParentData with ContainerParentDataMixin<Rend
erBox> { | 9 class FlexBoxParentData extends BoxParentData with ContainerParentDataMixin<Rend
erBox> { |
10 int flex; | 10 int flex; |
| 11 |
11 void merge(FlexBoxParentData other) { | 12 void merge(FlexBoxParentData other) { |
12 if (other.flex != null) | 13 if (other.flex != null) |
13 flex = other.flex; | 14 flex = other.flex; |
14 super.merge(other); | 15 super.merge(other); |
15 } | 16 } |
| 17 |
16 String toString() => '${super.toString()}; flex=$flex'; | 18 String toString() => '${super.toString()}; flex=$flex'; |
17 } | 19 } |
18 | 20 |
19 enum FlexDirection { horizontal, vertical } | 21 enum FlexDirection { horizontal, vertical } |
20 enum FlexJustifyContent { | 22 enum FlexJustifyContent { |
21 flexStart, | 23 flexStart, |
22 flexEnd, | 24 flexEnd, |
23 center, | 25 center, |
24 spaceBetween, | 26 spaceBetween, |
25 spaceAround, | 27 spaceAround, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 192 } |
191 | 193 |
192 void hitTestChildren(HitTestResult result, { Point position }) { | 194 void hitTestChildren(HitTestResult result, { Point position }) { |
193 defaultHitTestChildren(result, position: position); | 195 defaultHitTestChildren(result, position: position); |
194 } | 196 } |
195 | 197 |
196 void paint(RenderObjectDisplayList canvas) { | 198 void paint(RenderObjectDisplayList canvas) { |
197 defaultPaint(canvas); | 199 defaultPaint(canvas); |
198 } | 200 } |
199 } | 201 } |
OLD | NEW |