rnButton

External Documentation

RNButtonElement rnButton({

  1. required String title,
  2. void onPress()?,
  3. String? color,
  4. bool? disabled,
  5. Map<String, dynamic>? props,
})

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));
}