20 lines
604 B
Dart
20 lines
604 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'ch934x_serial_platform_interface.dart';
|
|
|
|
/// An implementation of [Ch934xSerialPlatform] that uses method channels.
|
|
class MethodChannelCh934xSerial extends Ch934xSerialPlatform {
|
|
/// The method channel used to interact with the native platform.
|
|
@visibleForTesting
|
|
final methodChannel = const MethodChannel('ch934x_serial');
|
|
|
|
@override
|
|
Future<String?> getPlatformVersion() async {
|
|
final version = await methodChannel.invokeMethod<String>(
|
|
'getPlatformVersion',
|
|
);
|
|
return version;
|
|
}
|
|
}
|