setPresentation method

SdkTheme setPresentation(
  1. dynamic presentation
)

Accepts Presentation enum or chained presentation (e.g., Presentation.DIALOG_CENTER.cornerRadius(20))

Implementation

SdkTheme setPresentation(dynamic presentation) {
  Map<String, dynamic> config;
  if (presentation is PresentationConfig) {
    config = presentation.toMap();
  } else if (presentation is Presentation) {
    config = PresentationConfig(presentation).toMap();
  } else {
    throw ArgumentError('Expected Presentation or chained presentation modifiers');
  }
  _bridge.invoke('setPresentation', params: <String, dynamic>{'presentation': config});
  return this;
}