paramOptional method
Extension to wrap 'key' with BridgeParameter
//Without Extension method
final keyUnwrapped = BridgeParameter('icon', BridgeTypeAnnotation($IconData.$type), true);
//With Extension method you can write
final keyWrapped = 'icon'.paramOptional($IconData.$type);
See paramOptional for optional named param
See paramOptionalNullable
for nullable param
Implementation
BridgeParameter paramOptional(BridgeTypeAnnotation type) {
return BridgeParameter(
this,
type,
true,
);
}