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
This commit is contained in:
Hans Muller 2015-03-19 08:06:23 -07:00
parent e8318f65a7
commit cc4f7d0db0

View File

@ -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() {}