generateJsProps function
Converts props
into a JsMap that can be utilized with React.createElement()
.
Implementation
JsMap generateJsProps(Map props,
{bool convertRefValue = true,
bool convertCallbackRefValue = true,
List<String> additionalRefPropKeys = const [],
bool wrapWithJsify = true}) {
final propsForJs = JsBackedMap.from(props);
if (convertRefValue) {
convertRefValue2(propsForJs,
convertCallbackRefValue: convertCallbackRefValue, additionalRefPropKeys: additionalRefPropKeys);
}
assert(!mapHasCallbackRefWithDefinitelyNonNullableArgument(propsForJs), nonNullableCallbackRefArgMessage);
return wrapWithJsify ? jsifyAndAllowInterop(propsForJs) as JsMap : propsForJs.jsObject;
}