rnButton
External Documentation
RNButtonElement
rnButton(
Button component
Implementation
RNButtonElement rnButton({
required String title,
void Function()? onPress,
String? color,
bool? disabled,
Map<String, dynamic>? props,
}) {
final p = <String, dynamic>{'title': title};
if (onPress != null) p['onPress'] = onPress;
if (color != null) p['color'] = color;
if (disabled != null) p['disabled'] = disabled;
if (props != null) p.addAll(props);
return RNButtonElement.fromJS(rnElement('Button', props: p));
}