oaid_method_channel.dart 674 B

1234567891011121314151617181920212223
  1. import 'package:flutter/foundation.dart';
  2. import 'package:flutter/services.dart';
  3. import 'oaid_platform_interface.dart';
  4. /// An implementation of [OaidPlatform] that uses method channels.
  5. class MethodChannelOaid extends OaidPlatform {
  6. /// The method channel used to interact with the native platform.
  7. @visibleForTesting
  8. final methodChannel = const MethodChannel('oaid');
  9. @override
  10. Future<String?> getPlatformVersion() async {
  11. final version =
  12. await methodChannel.invokeMethod<String>('getPlatformVersion');
  13. return version;
  14. }
  15. @override
  16. Future<String?> getOaid() async {
  17. return await methodChannel.invokeMethod<String>('getOaid');
  18. }
  19. }