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

Unified Diff: sky/examples/fn/widgets/style_component.dart

Issue 975913002: Implement a floating action button in fn (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sky/examples/fn/widgets/floating_action_button.dart ('k') | sky/examples/fn/widgets/toolbar.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/fn/widgets/style_component.dart
diff --git a/sky/examples/fn/widgets/style_component.dart b/sky/examples/fn/widgets/style_component.dart
new file mode 100644
index 0000000000000000000000000000000000000000..fb18c52e86ea266d8b325c2b050ca6c969125182
--- /dev/null
+++ b/sky/examples/fn/widgets/style_component.dart
@@ -0,0 +1,17 @@
+part of widgets;
+
+abstract class StyleComponent extends Component {
+ Node content;
+
+ // Subclasses should implement this getter to provide their style information.
+ Style get style => null;
+
+ StyleComponent({ Object key, this.content }) : super(key: key);
+
+ Node render() {
+ return new Container(
+ style: style,
+ children: content == null ? [] : [content]
+ );
+ }
+}
« no previous file with comments | « sky/examples/fn/widgets/floating_action_button.dart ('k') | sky/examples/fn/widgets/toolbar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698