cim/cim-client-sdk/cim-flutter-sdk/lib/cim_flutter_sdk_method_channel.dart
2023-06-14 09:36:31 +08:00

18 lines
598 B
Dart

import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'cim_flutter_sdk_platform_interface.dart';
/// An implementation of [CimFlutterSdkPlatform] that uses method channels.
class MethodChannelCimFlutterSdk extends CimFlutterSdkPlatform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('cim_flutter_sdk');
@override
Future<String?> getPlatformVersion() async {
final version = await methodChannel.invokeMethod<String>('getPlatformVersion');
return version;
}
}