From cc4f7d0db06045f2373d22ecbe5fc98371d125d3 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Thu, 19 Mar 2015 08:06:23 -0700 Subject: [PATCH] Added a positional Component.fromArgs() constructor To define a Component subclass with mixins, a constructor without optional parameters is needed. Added Component.fromArgs() which just delegates to the main constructor. R=rafaelw@chromium.org Review URL: https://codereview.chromium.org/1017353002 --- framework/fn.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/fn.dart b/framework/fn.dart index 0024b96a1e6..af8b7560238 100644 --- a/framework/fn.dart +++ b/framework/fn.dart @@ -653,6 +653,9 @@ abstract class Component extends Node { _order = _currentOrder + 1, super(key:key); + Component.fromArgs(Object key, bool stateful) + : this(key: key, stateful: stateful); + void didMount() {} void didUnmount() {}