WidgetElement constructor
WidgetElement(
- BindingContext? context, {
- Map<
String, dynamic> ? defaultStyle, - bool isReplacedElement = false,
- bool isDefaultRepaintBoundary = true,
Implementation
WidgetElement(BindingContext? context, {
Map<String, dynamic>? defaultStyle,
bool isReplacedElement = false,
// WidgetElement Adds repaintBoundary by default to prevent the internal paint process from affecting the outside.
// If a lot of WidgetElement is used in a scene, you need to modify the default repaintBoundary according to the scene analysis.
// Otherwise it will cause performance problems by creating most layers.
bool isDefaultRepaintBoundary = true,
}) : super(
context,
defaultStyle: defaultStyle,
isReplacedElement: isReplacedElement,
isDefaultRepaintBoundary: isDefaultRepaintBoundary,
) {
WidgetsFlutterBinding.ensureInitialized();
_state = _KrakenAdapterWidgetState(this, attributes, childNodes);
_widget = _KrakenAdapterWidget(_state!);
}