setCustomAuthViewAllWidgets method

void setCustomAuthViewAllWidgets(
  1. JVUIConfig uiConfig, {
  2. List<JVCustomWidget>? widgets,
})

(不建议使用,建议使用 setAuthorizationView 接口)自定义授权页面,界面原始控件、新增自定义控件

Implementation

void setCustomAuthViewAllWidgets(JVUIConfig uiConfig,
    {List<JVCustomWidget>? widgets}) {
  var para = Map();

  var para1 = uiConfig.toJsonMap();
  para1.removeWhere((key, value) => value == null);
  para["uiconfig"] = para1;

  if (widgets != null) {
    var widgetList = [];
    for (JVCustomWidget widget in widgets) {
      var para2 = widget.toJsonMap();
      para2.removeWhere((key, value) => value == null);

      widgetList.add(para2);
    }
    para["widgets"] = widgetList;
  }

  _channel.invokeMethod("setCustomAuthViewAllWidgets", para);
}