build property
Build a widget tree with all registered plugins, passing each previous child as input to the next plugin.
Implementation
@override
W Function({
required BuildContext context,
required W child,
}) get build {
// Apply plugins in order, each wrapping the previous result.
return ({
required BuildContext context,
required W child,
}) {
return plugins.fold(child, (previousChild, plugin) {
return plugin.attach(context, previousChild);
});
};
}