ImageSpanMethodProvider constructor
ImageSpanMethodProvider()
Implementation
ImageSpanMethodProvider() {
pushMethodProp(
NodeProps.kSrc,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is String) {
consumer.src(value);
}
},
'',
),
);
pushMethodProp(
NodeProps.kSource,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is VoltronArray) {
consumer.source(value);
}
},
VoltronArray(),
),
);
pushMethodProp(
NodeProps.kOnProgress,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is bool) {
consumer.setOnProgress(value);
}
},
false,
),
);
pushMethodProp(
NodeProps.kOnLoadStart,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is bool) {
consumer.setOnLoadStart(value);
}
},
false,
),
);
pushMethodProp(
NodeProps.kOnLoad,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is bool) {
consumer.setOnLoad(value);
}
},
false,
),
);
pushMethodProp(
NodeProps.kOnLoadEnd,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is bool) {
consumer.setOnLoadEnd(value);
}
},
false,
),
);
pushMethodProp(
NodeProps.kOnError,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is bool) {
consumer.setOnError(value);
}
},
false,
),
);
pushMethodProp(
ImageVirtualNode.propVerticalAlignment,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is String) {
consumer.setVerticalAlignment(value);
}
},
'',
),
);
pushMethodProp(
ImageVirtualNode.propVerticalAlign,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is String) {
consumer.setVerticalAlignment(value);
}
},
'',
),
);
pushMethodProp(
NodeProps.kWidth,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is double) {
consumer.setWidth(value);
}
},
0.0,
),
);
pushMethodProp(
NodeProps.kHeight,
StyleMethodProp(
(consumer, value) {
if (consumer is ImageVirtualNode && value is double) {
consumer.setHeight(value);
}
},
0.0,
),
);
}