mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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:
parent
e8318f65a7
commit
cc4f7d0db0
@ -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() {}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user