20 lines
621 B
Dart
20 lines
621 B
Dart
import 'package:flutter/services.dart';
|
||
import 'package:loopin/IM/im_friend_listeners.dart';
|
||
|
||
class WechatBusinessView {
|
||
static const MethodChannel _channel = MethodChannel('wechat_business_view'); // mainactivity.kt,appdelegate.swift
|
||
|
||
/// 调起微信确认收款码
|
||
static Future<bool> openBusinessView({required String packageInfo}) async {
|
||
try {
|
||
final result = await _channel.invokeMethod('openBusinessView', {
|
||
'package': packageInfo,
|
||
});
|
||
return result == true;
|
||
} on PlatformException catch (e) {
|
||
logger.w('调用失败: ${e.message}');
|
||
return false;
|
||
}
|
||
}
|
||
}
|