Element constructor
- Widget widget
Creates an element that uses the given widget as its configuration.
Typically called by an override of Widget.createElement.
Implementation
Element(Widget widget)
: _widget = widget {
if (kFlutterMemoryAllocationsEnabled) {
FlutterMemoryAllocations.instance.dispatchObjectCreated(
library: _flutterWidgetsLibrary,
className: '$Element',
object: this,
);
}
}