app-starlock/star_lock/lib/tools/NativeInteractionTool.dart
2024-01-24 18:44:34 +08:00

19 lines
462 B
Dart

import 'package:flutter/services.dart';
///原生交互配置
class NativeInteractionConfig{
static String eventChannel = 'starLockFlutterReceive';
static String methodChannel = 'starLockFlutterSend';
}
///原生交互flutter向原生发送消息
class NativeInteractionTool{
static loadNativeShare({required String shareText}){
MethodChannel(NativeInteractionConfig.methodChannel).invokeMethod('loadNativeShare', {'shareText':shareText});
}
}