widget property

  1. @override
SingleChildStatelessModifier get widget
override

The configuration for this element.

Avoid overriding this field on Element subtypes to provide a more specific widget type (i.e. StatelessElement and StatelessWidget). Instead, cast at any call sites where the more specific type is required. This avoids significant cast overhead on the getter which is accessed throughout the framework internals during the build phase - and for which the more specific type information is not used.

Implementation

@override
SingleChildStatelessModifier get widget => super.widget as SingleChildStatelessModifier;