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 'basic.dart'; | 5 import 'basic.dart'; |
6 import 'button_base.dart'; | 6 import 'button_base.dart'; |
7 import 'ink_well.dart'; | 7 import 'ink_well.dart'; |
8 import 'material.dart'; | 8 import 'material.dart'; |
9 import 'theme.dart'; | 9 import 'theme.dart'; |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 Function onPressed; | 24 Function onPressed; |
25 | 25 |
26 void syncFields(FloatingActionButton source) { | 26 void syncFields(FloatingActionButton source) { |
27 super.syncFields(source); | 27 super.syncFields(source); |
28 child = source.child; | 28 child = source.child; |
29 onPressed = source.onPressed; | 29 onPressed = source.onPressed; |
30 } | 30 } |
31 | 31 |
32 Widget buildContent() { | 32 Widget buildContent() { |
33 return new Material( | 33 return new Material( |
34 color: Theme.of(this).accent[200], | 34 color: Theme.of(this).floatingActionButtonColor, |
35 edge: MaterialEdge.circle, | 35 type: MaterialType.circle, |
36 level: highlight ? 3 : 2, | 36 level: highlight ? 3 : 2, |
37 child: new ClipOval( | 37 child: new ClipOval( |
38 child: new Listener( | 38 child: new Listener( |
39 onGestureTap: (_) { | 39 onGestureTap: (_) { |
40 if (onPressed != null) | 40 if (onPressed != null) |
41 onPressed(); | 41 onPressed(); |
42 }, | 42 }, |
43 child: new Container( | 43 child: new Container( |
44 width: _kSize, | 44 width: _kSize, |
45 height: _kSize, | 45 height: _kSize, |
46 child: new InkWell(child: new Center(child: child)) | 46 child: new InkWell(child: new Center(child: child)) |
47 ) | 47 ) |
48 ) | 48 ) |
49 ) | 49 ) |
50 ); | 50 ); |
51 } | 51 } |
52 | 52 |
53 } | 53 } |
OLD | NEW |