app-starlock/star_lock/lib/tools/NativeInteractionTool.dart

19 lines
462 B
Dart
Raw Normal View History

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