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

Unified Diff: sky/sdk/lib/framework/components2/floating_action_button.dart

Issue 1177243002: Refactor fn2.dart, since it breached our 1000-line threshold. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: sky/sdk/lib/framework/components2/floating_action_button.dart
diff --git a/sky/sdk/lib/framework/components2/floating_action_button.dart b/sky/sdk/lib/framework/components2/floating_action_button.dart
deleted file mode 100644
index b5555f1cf451c152528ba5307c9b5bee9ef453c0..0000000000000000000000000000000000000000
--- a/sky/sdk/lib/framework/components2/floating_action_button.dart
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import '../fn2.dart';
-import '../rendering/box.dart';
-import '../painting/shadows.dart';
-import '../theme2/colors.dart';
-import 'dart:sky' as sky;
-import 'ink_well.dart';
-import 'material.dart';
-
-// TODO(eseidel): This needs to change based on device size?
-// http://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylines-keylines-spacing
-const double _kSize = 56.0;
-
-class FloatingActionButton extends Component {
-
- FloatingActionButton({ Object key, this.content, this.level: 0 })
- : super(key: key);
-
- final UINode content;
- final int level;
-
- UINode build() {
- List<UINode> children = [];
-
- if (content != null)
- children.add(content);
-
- return new Material(
- content: new CustomPaint(
- callback: (sky.Canvas canvas, Size size) {
- const double radius = _kSize / 2.0;
- sky.Paint paint = new sky.Paint()..color = Red[500];
- var builder = new ShadowDrawLooperBuilder()
- ..addShadow(const sky.Size(0.0, 5.0),
- const sky.Color(0x77000000),
- 5.0);
- paint.setDrawLooper(builder.build());
- canvas.drawCircle(radius, radius, radius, paint);
- },
- child: new ClipOval(
- child: new Container(
- width: _kSize,
- height: _kSize,
- child: new InkWell(children: children)
- )
- )
- ),
- level: level);
- }
-
-}
« no previous file with comments | « sky/sdk/lib/framework/components2/fixed_height_scrollable.dart ('k') | sky/sdk/lib/framework/components2/icon.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698