admin
2022-05-19 56364722d3ed70d48ec41f567a4e59e5ccbbb868
src/main/resources/code/android/library-flutter/src/main/java/com/demo/library_flutter/message/UIMethodChannel.java
@@ -16,10 +16,11 @@
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodCodec;
import io.flutter.plugin.common.StandardMessageCodec;
import io.flutter.plugin.common.StandardMethodCodec;
public class UIMethodChannel extends MethodChannel {
    public UIMethodChannel(BinaryMessenger messenger, Context context, DataListener dataListener) {
        super(messenger, "com.yeshi.video/ui", (MethodCodec) StandardMessageCodec.INSTANCE);
        super(messenger, "com.yeshi.video/ui", StandardMethodCodec.INSTANCE);
        setMethodCallHandler(new MethodCallHandler() {
            @Override
            public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
@@ -46,6 +47,14 @@
                            StatusBarUtil.setDarkMode(FlutterBoost.instance().currentActivity());
                        }
                        break;
                    //跳转原生页面
                    case "jumpAppPage": {
                        Map<String, Object> params = (Map<String, Object>) call.arguments;
                        String type = params.get("type").toString();
                        Map<String, Object> ps = (Map<String, Object>) params.get("params");
                        dataListener.jumpAppPage(type, ps);
                    }
                    break;
                }
            }
        });
@@ -54,5 +63,8 @@
    public interface DataListener {
        //状态栏是否默认浅色
        public boolean isStatusBarDefaultLight();
        public void jumpAppPage(String type, Map<String, Object> params);
    }
}