Files
jinzhi/packages/flutter_paid/lib/flutter_paid_method_channel.dart
2026-06-18 15:02:28 +08:00

24 lines
720 B
Dart

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